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

[Validator] Un-deprecate passing an annotation reader to AnnotationLoader #51454

Merged

Conversation

derrabus
Copy link
Member

Q A
Branch? 6.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets Follow-up to #51425
License MIT
Doc PR N/A

#51425 deprecated the AnnotationLoader class and its replacement already does not accept an annotation reader anymore. Thus, the deprecation of the constructor parameter is redundant, which is why I propose to take it back.

cc @alexandre-daubois

@@ -212,7 +213,7 @@ public function testLoadGroupSequenceProviderAnnotation()

protected function createAnnotationLoader(): AnnotationLoader
{
return new AnnotationLoader();
return new AttributeLoader();
Copy link
Member

Choose a reason for hiding this comment

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

This does not match the return type

Copy link
Member Author

@derrabus derrabus Aug 22, 2023

Choose a reason for hiding this comment

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

It does, AttributeLoader extends AnnotationLoader. This class (AttributeLoaderTest) has two child classes which override this method. I have to keep the return type wide, otherwise I would break those child classes.

@alexandre-daubois
Copy link
Contributor

alexandre-daubois commented Aug 22, 2023

Just for the record, I'm working on deprecating the serializer's AnnotationLoader too (and replacing it by an AttributeLoader). 🙂 I'll include this same undeprecation in the coming PR

@derrabus derrabus merged commit 991d81e into symfony:6.4 Aug 23, 2023
6 of 9 checks passed
@derrabus derrabus deleted the improvement/undeprecate-annotation-reader-param branch August 23, 2023 11:31
This was referenced Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants