Skip to content

[Contracts] Allow psr/container 1.1 again #53150

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
merged 1 commit into from
Dec 20, 2023

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Dec 19, 2023

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues N/A
License MIT

The only difference between psr/container 1.1 and 2.0 is one additional return type on the ContainerInterface::has() method, see php-fig/container@1.1.2...2.0.2

This means that if a package is compatible with 2.0 already (== all implementations already have that return type), it remains compatible with 1.1. However, in #42088 we changed the composer.json of our service-contracts package and replaced ^1.1 with ^2.0, dropping support for 1.1 although there was no need to do so.

I'm migrating a larger application to Symfony 7 at the moment which also consumes various Laminas packages. Due to Laminas still being stuck on psr/container 1.1, I cannot upgrade to service-contracts 3 which in turn blocks my Symfony 7 upgrade.

It would smoothen the upgrade path a lot for me, if we released a service-contracts 3.x that allows the installation of psr/container 1.1 again.

@carsonbot carsonbot changed the title Allow psr/container 1.1 again [Contracts] Allow psr/container 1.1 again Dec 19, 2023
@carsonbot carsonbot added this to the 6.4 milestone Dec 19, 2023
@bendavies
Copy link
Contributor

@xabbuh
Copy link
Member

xabbuh commented Dec 20, 2023

For 6.3?

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Works for me. 3.3 or 3.4 won't make a difference so I'm fine targeting 6.4 (=3.4)

Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

got it now, the change happens in the contracts which have a different version schema than the rest of the components

@derrabus derrabus merged commit a41993a into symfony:6.4 Dec 20, 2023
@derrabus derrabus deleted the improvement/psr-container-1.1-compat branch December 20, 2023 08:53
@derrabus
Copy link
Member Author

Thank you very much for the quick approval. 🚀

@derrabus
Copy link
Member Author

Works for me. 3.3 or 3.4 won't make a difference so I'm fine targeting 6.4 (=3.4)

The change does not appear in the split repository: https://github.com/symfony/service-contracts/branches/all

Did we target the wrong branch or is there something wrong with the splitter?

@nicolas-grekas
Copy link
Member

I think we might need to merge up

@xabbuh
Copy link
Member

xabbuh commented Dec 20, 2023

I think we might need to merge up

did that, but that doesn't seem to be enough (or the sync takes longer than I expected)

@derrabus
Copy link
Member Author

The change does appear on the contracts repository however: symfony/contracts@bd6978f. But apparently, it does not travel further down to the service-contracts package from there. 😕

@derrabus
Copy link
Member Author

Problem solved: symfony/service-contracts@11bbf19 🥳

This was referenced Dec 30, 2023
nicolas-grekas added a commit that referenced this pull request Jan 10, 2024
This PR was merged into the 6.4 branch.

Discussion
----------

[Contracts] Allow psr/container 1.1 again

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | N/A
| License       | MIT

This a follow up from  #53150 (initially incorrectly submitted against symfony/contracts#6).

Commits
-------

df47df5 Allow psr/container 1.1 again
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.

5 participants