Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove calls to AnnotationRegistry::registerLoader() #48725

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

Conversation

derrabus
Copy link
Member

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? yes
Tickets N/A
License MIT
Doc PR N/A

Calling AnnotationRegistry::registerLoader() should not be necessary anymore since Annotations 1.10 (April 2020), as long as all annotations are autoloadable. Let's remove all calls to that method.

@derrabus
Copy link
Member Author

derrabus commented Dec 20, 2022

Technically, we could do this on 5.4 already because AnnotationRegistry::registerLoader('class_exists'); should be a no-op and we already have conflict rules for Annotations < 1.10 in place. Let me know if you think I should backport the change.

The low-deps tests showed me that we should not backport. Registering class_exists as loader is still necessary, if someone somewhere calls (the also deprecated) AnnotationRegistry::registerFile(). Removing our only call to that method required me to bump the ORM to >= 2.12.

We cannot anticipate if a codebase still has that AnnotationRegistry::registerFile() call somewhere, so we might as well decide to not merge this change as long as we support Annotations v1.

@derrabus derrabus force-pushed the improvement/remove-annotation-loader branch from 28a7226 to caf16ed Compare December 20, 2022 19:54
@nicolas-grekas nicolas-grekas force-pushed the improvement/remove-annotation-loader branch from 066d851 to c0e9ee1 Compare December 22, 2022 14:39
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas
Copy link
Member

I reverted the part about phpunit-bridge in 9f5c005

@derrabus
Copy link
Member Author

Fair enough, but the ORM bump in the root composer.json was still legit. Why did you revert it as well?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 28, 2022

By mistake, let me fix that.
Fixed in 6d3b3f1

@derrabus
Copy link
Member Author

Thanks!

bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Jan 9, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Jan 9, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Jan 9, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Jan 9, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Jan 9, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Feb 15, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Feb 15, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Feb 15, 2023
bitgandtter pushed a commit to timgchile/symfony that referenced this pull request Feb 15, 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.

4 participants