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
Add native return types where possible #10547
Conversation
…ble properties on Composer for non-fully-loaded instances, add types to Composer\Factory
In this pre-release writted that:
but this pull request contains changes in |
Well, NullIO was not considered as being part of the most extended classes |
Thanks to @dseguy using some of his https://www.exakat.io/ tech I got a list of ~100 classes/interfaces which are extended by the ~2500 packages requiring composer/composer. This allowed me to avoid touching public/protected methods for these, to hopefully mostly avoid breakage in third party packages due to the added return types.
Other files as well as tests have had all their return types added.
The other potential problem point is in 84f0f19 which splits some of
Composer\Composer
into a base classComposer\PartialComposer
for global instances which are not fully loaded for perf reasons. This allows the code here to remain simpler with less nullable properties/getters, but it may have some impact tho that's harder to predict.The goal here anyway is to ship this out and then promptly undo any return type which causes too much unintended pain. It's the best compromise I've found between doing nothing and doing a hard break for 3.0 forcing all plugins to be updated again.