Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer - Patch support issues #8368

ihor-sviziev opened this issue Oct 9, 2019 · 1 comment


Copy link

commented Oct 9, 2019

My composer.json:

    "name": "vendor/module",
    "description": "description",
    "homepage": "",
    "require": {
        "php": "^7.1.3",
        "magento/product-community-edition": "~2.3.2",
        "magento/module-catalog-import-export": "101.0.2|101.0.2-p*",
        "psr/log": "^1.0"
    "type": "magento2-module",
    "license": "proprietary",
    "autoload": {
        "files": [
        "psr-4": {
            "Vendor\\Module\\": ""

Output of composer diagnose (in another directory):

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking oauth access: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
Checking composer version: OK
Composer version: 1.9.0
PHP version: 7.1.32
PHP binary path: /usr/bin/php7.1

When I run this command:

composer diagnose -v

I get the following output:

  Could not parse version constraint 101.0.2-p*: Invalid version string "101.0.2-p*"  

Exception trace:
 () at phar:///usr/bin/composer/vendor/composer/semver/src/VersionParser.php:477
 Composer\Semver\VersionParser->parseConstraint() at phar:///usr/bin/composer/vendor/composer/semver/src/VersionParser.php:249
 Composer\Semver\VersionParser->parseConstraints() at phar:///usr/bin/composer/src/Composer/Package/Version/VersionParser.php:29
 Composer\Package\Version\VersionParser->parseConstraints() at phar:///usr/bin/composer/src/Composer/Package/Loader/ArrayLoader.php:238
 Composer\Package\Loader\ArrayLoader->parseLinks() at phar:///usr/bin/composer/src/Composer/Package/Loader/ArrayLoader.php:121
 Composer\Package\Loader\ArrayLoader->load() at phar:///usr/bin/composer/src/Composer/Package/Loader/RootPackageLoader.php:115
 Composer\Package\Loader\RootPackageLoader->load() at phar:///usr/bin/composer/src/Composer/Factory.php:351
 Composer\Factory->createComposer() at phar:///usr/bin/composer/src/Composer/Factory.php:576
 Composer\Factory::create() at phar:///usr/bin/composer/src/Composer/Console/Application.php:354
 Composer\Console\Application->getComposer() at phar:///usr/bin/composer/src/Composer/Console/Application.php:471
 Composer\Console\Application->getPluginCommands() at phar:///usr/bin/composer/src/Composer/Console/Application.php:165
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:106
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:61
 require() at /usr/bin/composer:24

And I expected this to happen:
It will show diagnose data.

Additional info:

This issue appear even i'll try to execute just composer, composer -v or composer -V.

According to - version 101.0.2-p2 - valid version, so we should able to depends on it.

Also I think composer should be able to write his version, diagnose with even broken composer.json file in the folder.


This comment has been minimized.

Copy link

commented Oct 10, 2019

Composer cannot operate with a broken composer.json file because this file is read before most actions are taken. So you have to fix the contents before you can execute whichever command you want to execute. To see what kind of constraints we support, please read

@alcohol alcohol closed this Oct 10, 2019
@alcohol alcohol added the Won't Fix label Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.