mrclay / minify

Combines. minifies, and serves CSS or Javascript files
BSD 3-Clause "New" or "Revised" License
3.01k stars 472 forks source link

Issue with Psr/container > 1.1.2 #703

Closed chrispcb closed 1 year ago

chrispcb commented 1 year ago

PHP > 7.4 Psr/container >= 2.0.0

Fatal error: Declaration of Props\Container::has($name) must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in \mrclay\props-dic\src\Props\Container.php on line 105

Minify works with psr/container 1.1.2 line : public function has(string $id): bool;

glensc commented 1 year ago

unclear what is your props version, it had recently a release:

chrispcb commented 1 year ago

Minify version : 3.0.13 If I force downgrade Psr in 1.1.2 it's ok.

glensc commented 1 year ago

I asked for "mrclay/props-dic" version

but yes, you need to install compatible psr/container version.

chrispcb commented 1 year ago

:) ok, Psr 2.0.2 from your package. And dosen't work. So, I downgrade Psr in 1.1.2 and it's ok.

luigif commented 1 year ago

Still having this issue.

php 7.4.33 mrclay/jsmin-php 2.4.3 mrclay/minify 3.0.13 mrclay/props-dic 3.0.1 psr/container 2.0.2

PHP Fatal error: Declaration of Props\Container::has($name) must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in /xxxxx/vendor/mrclay/props-dic/src/Props/Container.php on line 105

Downgrading to psr/container 1.1.2 solves issue.