Clarifications on --ignore-platform-req=php+ #11975
Replies: 1 comment
-
No if you run with php 8.2 it will not install something requiring 8.3. I think it'll work as expected mostly here, but sure you might find some weird case where it does something wrong as it suppresses some part of the constraints that's normal really. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I've been looking into
composer install/require/update
docs and there is an option--ignore-platform-req
(withouts
) that I can use to install packages even tho my php version is greater than max allowed version in package requirements. This is great but I need some more clarifications how it works exactly with other packages that I actually do not need this option.For example my PHP version is
8.2
and my app requires packages like:package-a
(older version1.0
requiresphp >= 8.0
andphp < 8.3
, new version2.0
requiresphp >= 8.3
)package-b
(old archived package that requires php >= 8.0, php <= 8.1)package-b-1
(required bypackage-b
, php >= 8.0, php <= 8.3)package-b-2
(required bypackage-b
, php >= 8.0, php <= 8.1)Normally
composer install
will try to install from lock file and will fail because of PHP version8.2
. When I add--ignore-platform-req=php+
it should work and install version from lockfile, right?What bout
composer update
? Will it fail also because ofpackage-b
(and some of its deps) requires older PHP? When I add--ignore-platform-req=php+
it should work right? But then will it also installpackage-a
with latest version2.0
that requiresphp >= 8.3
?Same question as above will also be for
composer require
and--ignore-platform-req=php+
. Willcomposer require package-a --ignore-platform-req=php+
try to install latest version ofpackage-a
by default or more like latest that matches current PHP version? In case ofpackage-a
it would be1.0
instead of2.0
(because PHP 8.2).Thanks.
Beta Was this translation helpful? Give feedback.
All reactions