Skip to content

Use PHP attributes in tests for PHP8+ #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

norkunas
Copy link
Collaborator

Pull Request

Related issue

Fixes #<issue_number>

What does this PR do?

  • Configures PHP attributes to be used in tests for PHP8+

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I get it right... After PHP 8 doctrine supports the #[...] notation in the PHP classes instead of making comments?

This will be the default soon?

@@ -0,0 +1,25 @@
framework:
test: true
secret: 67d829bf61dc5f87a73fd814e2c9f629
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this value intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it as it was :)

@norkunas
Copy link
Collaborator Author

Just to make sure I get it right... After PHP 8 doctrine supports the #[...] notation in the PHP classes instead of making comments?

This will be the default soon?

Not sure when the support for annotations will be dropped, but when this bundle will drop support for php 7.4 then the annotations from tests could be removed because I think most people who use php8 are already migrated to attributes or easily can migrate with rector. But those who don't then they will rely on annotations support in ORM itself

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @norkunas for your contribution 🎉

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 20, 2023

@bors bors bot merged commit bb21947 into meilisearch:main Mar 20, 2023
@norkunas norkunas deleted the php-attributes branch March 20, 2023 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants