/composer-version-constraint

Latest composer throwing version constraint error for Could not parse version constraint 5.5.33 as ^5.2: Invalid version string "^5.2"

Primary LanguagePHPThe UnlicenseUnlicense

composer-version-constraint

Latest composer throwing version constraint error

Could not parse version constraint 5.5.33 as ^5.2: Invalid version string "^5.2"

Clone the repo to root folder where Magento2 root composer.json is installed

git clone git@github.com:rapiddive/composer-version-constraint.git

In root composer.json for Magento2

{
    ...
    "autoload": {
        "files": [
            ...
            "composer-version-constraint/ComposerRepository.php"
            ...
        ],
    }
    ...
}

Dump autoload

composer dumpautoload

Install any package causing issue with following command

./vendor/bin/composer require vendor/packagename

##Reference Issue magento/magento2#26689