symfony / flex

Composer plugin for Symfony
MIT License
4.15k stars 181 forks source link

Flex tries to install version that are not tagged #989

Open icanhazstring opened 1 year ago

icanhazstring commented 1 year ago

Hi seems like I have found an issue with symfony/flex regarding * version constraint.

Problem: Having the following requirements:

{
    "require": {
        "php": ">=8.2",
        "symfony/flex": "^2.3.2",
        "symfony/framework-bundle": "~6.3.2",
    }
}

Running the following command will fail as symfony/flex takes the version from symfony/framework-bundle to replace any * version inside the pack.

composer req symfony/serializer-pack

Problem here symfony/property-info does not have a version 6.3.2 so the installation failes. When I remove symfony/flex and simply require property-info with * everything works fine and version v6.3 is installed.