-
Notifications
You must be signed in to change notification settings - Fork 32
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
Compatibility with newer psr libraries #87
Comments
|
Proposal: branch master off to 1.x, new master (2.x) requires PHP 8.0 and supports the newer psr interfaces. |
The PSR-11 version 2.0.0 added the bool return type to the has method of the ContainerInterface; https://github.com/php-fig/container/releases/tag/2.0.0 Does this have any incompatibilities with current implementation? Thanks for your work! |
@erickcomp Yeah, it's super not backwards compatible for implementing libraries. I would have to have a 2.0 for PHP7 and a 3.0 for the other PSRs, was hoping to minimize the number of major versions of the repo. Especially since there isn't a good way of managing versions of the extension like you can libraries with composer. |
Change in plans: I will investigate shipping all major versions of each PSR simultaneously, selectable via an INI setting. For example we will define In v2.0 the default will still be v1 of each of the PSRs. The class entries exported in the headers as they are now will remain and will point to the aliased class. We will also export class entries for each version in their own headers. Thoughts and feedback appreciated! |
Awesome! Good for fine tuning between projects. Thank you for your efforts! |
I wasn't and am not involved in PHP-FIG, but this is most likely due to them targeting the oldest current supported version of PHP when they were authored. And they are updating them, some of them at least, which is what's causing me quite some trouble :) |
In general, providing the PSR interfaces version zoo via an extension is impossible in a consistent way. Composer probably isn't aware that this extension is installed, so the extension will provide a different version of the interface than the software expects and is installing. Combining all PSR interfaces into one extension multiplies the problems because you have to provide all versions combined will all versions. Selecting the versions via PHP INI settings isn't really helping in case one single PHP configuration is expected to power multiple applications that require different interface versions. And there are practical problems with class_alias() apparantly, that trigger unexpected errors like this: laminas/laminas-servicemanager#124 (comment) |
Currently there is a 2.0 out of
psr/container
andpsr/link
which require PHP 8.0 and are not compatible with the libraries we test against. We should review other PSR repos for newer versions develop an upgrade plan.See #84
The text was updated successfully, but these errors were encountered: