cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.46k stars 892 forks source link

Revise psr/container compatiblity #2227

Closed mbrodala closed 11 months ago

mbrodala commented 11 months ago

With https://github.com/cakephp/phinx/pull/2106 the support for psr/container 1.x was dropped, now supporting version 2.x only.

Now I wonder if this change is really necessary. Currently this means that using Phinx with some Symfony packages 5.x (namely symfony/dependency-injection) is not possible anymore since these require psr/container 1.x; support for psr/container 2.x was added with Symfony 6.x.

AFAIS the ContainerInterface / getContainer() usage in Phinx itself is very slim:

Nothing here requires API from psr/container 2.x unless I'm missing something.

So maybe consider supporting psr/container 1.x again?

dereuromark commented 11 months ago

You can make a PR and if nothing breaks we could definitly consider it for better compatibility range.

MasterOdin commented 11 months ago

Phinx also relies on cakephp/database which relies on cakephp/core which relies on psr/container:^2.0, so not really a way for phinx currently to specify "psr/container": "^1.0 | ^2.0" currently. This would be another point in favor of #1754 I suppose.

mbrodala commented 11 months ago

@MasterOdin Thanks for the research. Indeed in this case I still couldn't keep psr/container 1.x.

dereuromark commented 11 months ago

Resolved with https://github.com/cakephp/cakephp/pull/17356#issuecomment-1765647895

wallacio commented 10 months ago

With that last merge to cakephp/cakephp, will composer.json be updated to allow both versions?

dereuromark commented 10 months ago

What do you mean? https://github.com/cakephp/cakephp/releases/tag/5.0.2 shows it was all released already as such.

wallacio commented 10 months ago

Yes, noted - I'm referring to https://github.com/cakephp/phinx/blob/a86db7ca2c3156891831c33bcd9f173f94ba68d2/composer.json#L41 ...which won't allow for 1.x?

dereuromark commented 10 months ago

Released