slim4-skeleton icon indicating copy to clipboard operation
slim4-skeleton copied to clipboard

Error add slim/twig-view (composer require slim/twig-view)

Open matejik opened this issue 1 year ago • 2 comments

Hi, I tried adding according to the documentation (eBook Vol. 1) slim/twig-view with the below result.

Problem 1 - Root composer.json requires slim/twig-view ^3.3 -> satisfiable by slim/twig-view[3.3.0]. - slim/twig-view 3.3.0 requires psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Using --with-all-dependencies where psr/http-message will be downgraded is probably not the right way? Thank you for the answer on how to proceed correctly

Thanks Jiri

matejik avatar Apr 23 '24 20:04 matejik

Hi @matejik

It seems like there's a compatibility issue between the versions of slim/twig-view and the latest psr/http-message package. The slim/twig-view declares v1.1 as dependency, which should be changed to ^1.1 || ^2.0 in this package, exactly here:

https://github.com/slimphp/Twig-View/blob/3.x/composer.json#L22

I will try to create a PR and hope that it's getting merged.

odan avatar Apr 23 '24 22:04 odan

It should work now.

odan avatar May 01 '24 09:05 odan