Skip to content

PHP 8.5 and newer support #20

@heinrichschiller

Description

@heinrichschiller

Hello,

I noticed that this library has already been updated, so I’m posting my issue here as a representative example for other affected libraries.

I updated the other libraries last year but didn’t really consider the use of PHP 8.5. Today, I created a new project just for testing purposes using PHP 8.5, and Composer failed to install the dependencies because they are not compatible with that PHP version.

Your requirements could not be resolved to an installable set of packages.

Problem 1
 - Root composer.json requires selective/array-reader 2.2.0 -> satisfiable by selective/array-reader[2.2.0].
 - selective/array-reader 2.2.0 requires php 8.1.* || 8.2.* || 8.3.* || 8.4.* -> your php version (8.5.3) does not satisfy that requirement.
Problem 2
 - Root composer.json requires selective/config 1.3.0 -> satisfiable by selective/config[1.3.0].
 - selective/config 1.3.0 requires php 8.1.* || 8.2.* || 8.3.* || 8.4.* -> your php version (8.5.3) does not satisfy that requirement.
Problem 3
 - Root composer.json requires selective/test-traits ^4.2 -> satisfiable by selective/test-traits[4.2.0, 4.2.1].
 - selective/test-traits[4.2.0, ..., 4.2.1] require php ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 -> your php version (8.5.3) does not satisfy that requirement.

I could submit a new pull request adding PHP 8.5 compatibility, but when the next PHP version is released, the same issue will occur again.

Before attempting any changes, I would like to know your thoughts on this. Should the PHP requirement continue to be defined like this?

"require": {
        "php": "8.1.* || 8.2.* || 8.3.* || 8.4.* || 8.5.*",
},

Or would it be better to define it more generically, for example:

"require": {
        "php": "<= 8.1",
},

Perhaps Odan has already set an example in other repositories — I just wanted to ask first.

Additionally, since PHP 8.1 is no longer officially supported, would it make sense to drop it and instead require a minimum of PHP 8.2?

Thank you in advance.

Kind regards,
Heinrich

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions