laminas / laminas-di

Automated dependency injection for PSR-11 containers
https://docs.laminas.dev/laminas-di/
BSD 3-Clause "New" or "Revised" License
36 stars 20 forks source link

laminas/laminas-crypt:^3.4 provoques Exception #88

Closed ThibaultPelloquin closed 1 year ago

ThibaultPelloquin commented 1 year ago

Bug Report

Installing on Symfony 6.2 project with PHP 8.1

Q A
Version(s) 3.0.6

Summary

Get this Exception :

PHP Fatal error: Declaration of Laminas......::has($name) must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in /path/info line int

Same as described here: https://github.com/laminas/laminas-di/issues/78

Expected behavior

Solution: replace laminas/laminas-crypt:^3.4 by laminas/laminas-crypt:^3.10 where bug has been fixed.

Ocramius commented 1 year ago

laminas/laminas-crypt:^3.10 is included in the laminas/laminas-crypt:^3.4 range.

Are you running composer update --ignore-platform-reqs, perhaps? Because laminas/laminas-crypt:3.4.0 does NOT support php:8.1.*:

https://github.com/laminas/laminas-crypt/blob/a058eeb2fe57824b958ac56753faff790a649e18/composer.json#L22

Ocramius commented 1 year ago

Closing here: root cause is not a link with laminas/laminas-crypt, since a dependency upgrade would on your end would already show that :-)

Please re-open after making sure you are on the latest dependencies.