Skip to content
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

Use attributes in tests #2596

Merged
merged 5 commits into from
Mar 6, 2024
Merged

Conversation

franmomu
Copy link
Contributor

@franmomu franmomu commented Dec 8, 2023

This PR changes most of the annotations for attributes since our minimum PHP version is 8.1, the tests changed are the ones relying on BaseTestCase::createMetadataDriverImpl()

This builds on top of #2502 to make sure it works fine.

I've used rector with some manual adjustments.

@franmomu franmomu marked this pull request as draft December 8, 2023 11:14
@franmomu franmomu force-pushed the use_attributes_in_tests branch 2 times, most recently from 2a9eb8a to 3cd19d1 Compare December 22, 2023 09:41
@franmomu franmomu force-pushed the use_attributes_in_tests branch 2 times, most recently from e5d2ddd to 36f56a8 Compare December 31, 2023 12:37
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

The tools/sandbox/Documents are still using annotation. Do you plan to update them also?

I've used rector with some manual adjustments.

Do you remember what had to be fixed manually? Is there anything that can be improved in rector?

@franmomu franmomu force-pushed the use_attributes_in_tests branch 2 times, most recently from b2c84e9 to 37b6a10 Compare March 5, 2024 21:18
@franmomu franmomu marked this pull request as ready for review March 5, 2024 21:21
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

SGTM

*
* @var string|null
*/
/** @var string|null */
Copy link
Member

Choose a reason for hiding this comment

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

Note for later, we can use typed properties.

@franmomu
Copy link
Contributor Author

franmomu commented Mar 5, 2024

The tools/sandbox/Documents are still using annotation. Do you plan to update them also?

Thanks, I didn't notice about those files.

I've used rector with some manual adjustments.

Do you remember what had to be fixed manually? Is there anything that can be improved in rector?

I don't remember 😞 after rectorphp/rector-doctrine#239 I think it was not so much work

@alcaeus alcaeus merged commit 8c7fa3f into doctrine:2.7.x Mar 6, 2024
20 checks passed
@franmomu franmomu deleted the use_attributes_in_tests branch March 6, 2024 14:36
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.

4 participants