Skip to content

Use --ignore-platform-req=php+ for ignoring PHP deps #179

Open
@boesing

Description

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

Composer with v2.2 released support for ignoring upper bounds of platform requirements.
To do so, adding the + suffix to the platform requirement will suffice.

This is quite useful, since --ignore-platform-req=php will mostly ignore any dependency and thus, depending on the constraint ranges, will also allow older PHP versions which weren't supported previously. This must not be related to laminas components but since laminas does sometimes use transitive dependencies, these dependencies could have a more wider range of supported PHP versions which then might install dependencies in case of --prefer-lowest which do definitely not support the latest PHP version we are actually trying to test.


From composer documentation:

--ignore-platform-req: ignore a specific platform requirement(php, hhvm, lib-* and ext-*) and force the installation even if the local machine does not fulfill it. Multiple requirements can be ignored via wildcard. Appending a + makes it only ignore the upper-bound of the requirements. For example, if a package requires php: ^7, then the option --ignore-platform-req=php+ would allow installing on PHP 8, but installation on PHP 5.6 would still fail.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions