-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Conflict with ext-psr
#125
Merged
Ocramius
merged 2 commits into
laminas:3.11.x
from
boesing:bugfix/conflict-with-psr-extension
Apr 7, 2022
Merged
Conflict with ext-psr
#125
Ocramius
merged 2 commits into
laminas:3.11.x
from
boesing:bugfix/conflict-with-psr-extension
Apr 7, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ias` to a non-user interface There is a PHP extension around which provides all (most?) PSR interfaces without the need of installing them via composer. Since we do not support this extension and since that extension does not make sense anyways (more details later), we explicitly adding a `conflict` to the `composer.json` so that there are no surprises for projects which do have the `psr` extension installed. closes laminas#124 Now to the problem with the extension: There are multiple PSR standards around. Many of them do have multiple major versions around. The extension has to follow semver to avoid breaks in upstream projects. So as of now (v1.2.0), it only provides the interfaces for the v1 versions of the PSR standards. There is no way to provide multiple major versions of the same PSR interface from within one version of the extension. Therefore, at some point, an upstream project is either stuck with the v1 versions of the PSR standards or the extension needs to create a hilarious amount of major versions to reflect all possible combinations of all major versions (cartesian product). Lets just take the PSR-11 + PSR-6 example, we already would have 6 major versions around because PSR-11 has 2 major versions and PSR-6 has 3 major versions: - psr/cache 1.x + psr/container 1.x - psr/cache 1.x + psr/container 2.x - psr/cache 2.x + psr/container 1.x - psr/cache 2.x + psr/container 2.x - psr/cache 3.x + psr/container 1.x - psr/cache 3.x + psr/container 2.x And these are only 2 packages. I lost track on the current progress, but there will be more major versions in the future and thus the amount of major versions for the extension will grow (and with that, the confusion for upstream projects, maintainers, etc.). We highly recommend to use composer to install the PSR standards per package in the version the upstream project can work with. **Do not use the `psr` extension** Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Note to readers: |
Ocramius
requested changes
Apr 7, 2022
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Ocramius
approved these changes
Apr 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @boesing!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There is a PHP extension around which provides all (most?) PSR interfaces without the need of installing them via composer. Since we do not support this extension and since that extension does not make sense anyways (more details later), we explicitly adding a
conflict
to thecomposer.json
so that there are no surprises for projects which do have thepsr
extension installed.closes #124
Now to the problem with the extension:
There are multiple PSR standards around. Many of them do have multiple major versions around. The extension has to follow semver to avoid breaks in upstream projects. So as of now (v1.2.0), it only provides the interfaces for the v1 versions of the PSR standards.
There is no way to provide multiple major versions of the same PSR interface from within one version of the extension.
Therefore, at some point, an upstream project is either stuck with the v1 versions of the PSR standards or the extension needs to create a hilarious amount of major versions to reflect all possible combinations of all major versions (cartesian product).
Lets just take the PSR-11 + PSR-6 example, we already would have 6 major versions around because PSR-11 has 2 major versions and PSR-6 has 3 major versions:
And these are only 2 packages. I lost track on the current progress, but there will be more major versions in the future and thus the amount of major versions for the extension will grow (and with that, the confusion for upstream projects, maintainers, etc.).
We highly recommend to use composer to install the PSR standards per package in the version the upstream project can work with.
Do not use the
psr
extension