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 require doesn't downgrade; composer update does #6389

Closed
sminnee opened this issue Apr 27, 2017 · 12 comments
Labels
Bug

Comments

@sminnee
Copy link
Contributor

@sminnee sminnee commented Apr 27, 2017

My composer.json (also available with git clone git@github.com:silverstripe/silverstripe-installer.git)

{
  "name": "silverstripe/installer",
  "description": "The SilverStripe Framework Installer",
  "require": {
    "php": ">=5.6.0",
    "silverstripe/admin": "1.0.x-dev",
    "silverstripe/asset-admin": "1.0.x-dev",
    "silverstripe/assets": "1.0.x-dev",
    "silverstripe/campaign-admin": "1.0.x-dev",
    "silverstripe/cms": "4.0.x-dev",
    "silverstripe/config": "1.0.x-dev",
    "silverstripe/framework": "4.0.x-dev",
    "silverstripe/graphql": "0.2.x-dev",
    "silverstripe/reports": "4.0.x-dev",
    "silverstripe/siteconfig": "4.0.x-dev",
    "silverstripe/versioned": "1.0.x-dev",
    "silverstripe-themes/simple": "~3.2.0",
    "silverstripe/behat-extension": "^2.1.0",
    "silverstripe/serve": "dev-master"
  },
  "require-dev": {
    "phpunit/PHPUnit": "^5.7"
  },
  "extra": {
    "branch-alias": {
      "dev-master": "4.0.x-dev"
    }
  },
  "config": {
    "process-timeout": 600
  },
  "prefer-stable": true,
  "minimum-stability": "dev"
}

If I run composer install this will install symfony/finder version 3.2.7 is installed.

If I run this command, it would require a downgrade of symfony/finder to 2.8.19 to resolve, which fails. Deleting composer.lock before running the command also fails.

composer require silverstripe/behat-extension:^2.3.7 silverstripe/serve:dev-master

However, this succeeds:

composer require --no-update silverstripe/behat-extension:^2.3.7 silverstripe/serve:dev-master
composer update

It appears that the scope of the require's in-built upgrade call doesn't allow downgrades, but composer update does.

This is confusing to me. Is this behaviour by design?

  • If so, I'd recommend a documentation update to clarify this (I'm happy to raise a docs PR once that's confirmed)
  • If not, this is my bug bug report.
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Apr 28, 2017

You should use composer require --update-with-dependencies.

@alcohol alcohol closed this Apr 28, 2017
@driskell

This comment has been minimized.

Copy link

@driskell driskell commented Oct 4, 2018

I have hit the same problem. --update-with-dependencies does not work and I had to use --no-update followed by the update command.

@amenk

This comment has been minimized.

Copy link

@amenk amenk commented Mar 6, 2019

@driskell same behavior here. --update-with-dependencies and --update-with-all-dependencies did not help. --no-update followed by the update command did.

Is this intended ?

@alcohol alcohol added the Bug label Mar 6, 2019
@alcohol alcohol reopened this Mar 6, 2019
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Mar 6, 2019

Unfortunately I am not able to reproduce this with the provided composer.json because it simply does not resolve to an installable dependency tree currently.

I would like to point out that having so many -dev constraints is absolutely horrible by the way.

rob@thinkpad ~ $ cd $(mktemp -d)

rob@thinkpad /tmp/tmp.FGyGf0scLL $ cat - > composer.json
{
  "name": "silverstripe/installer",
  "description": "The SilverStripe Framework Installer",
  "require": {
    "php": ">=5.6.0",
    "silverstripe/admin": "1.0.x-dev",
    "silverstripe/asset-admin": "1.0.x-dev",
    "silverstripe/assets": "1.0.x-dev",
    "silverstripe/campaign-admin": "1.0.x-dev",
    "silverstripe/cms": "4.0.x-dev",
    "silverstripe/config": "1.0.x-dev",
    "silverstripe/framework": "4.0.x-dev",
    "silverstripe/graphql": "0.2.x-dev",
    "silverstripe/reports": "4.0.x-dev",
    "silverstripe/siteconfig": "4.0.x-dev",
    "silverstripe/versioned": "1.0.x-dev",
    "silverstripe-themes/simple": "~3.2.0",
    "silverstripe/behat-extension": "^2.1.0",
    "silverstripe/serve": "dev-master"
  },
  "require-dev": {
    "phpunit/phpunit": "^5.7"
  },
  "extra": {
    "branch-alias": {
      "dev-master": "4.0.x-dev"
    }
  },
  "config": {
    "process-timeout": 600
  },
  "prefer-stable": true,
  "minimum-stability": "dev"
}

rob@thinkpad /tmp/tmp.FGyGf0scLL $ composer config platform.ext-intl 1.0 # necessary because i run composer in a container that has very few extensions

rob@thinkpad /tmp/tmp.FGyGf0scLL $ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package silverstripe/graphql 0.2.x-dev exists as silverstripe/graphql[0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 1.0.0, 1.0.0-rc1, 1.0.0-rc2, 1.0.0-rc3, 1.0.1, 1.0.1-rc1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.x-dev, 1.1.0, 1.1.0-rc1, 1.1.0-rc2, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.x-dev, 1.x-dev, 1.2.x-dev, 2.0.0, 2.0.0-beta1, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.x-dev, 2.x-dev, 3.0.0, 3.0.0-rc1, 3.0.1, 3.0.2, 3.0.x-dev, 3.x-dev, 3.1.x-dev, dev-master, 4.x-dev, dev-revert-182-pulls/3/not-my-type] but these are rejected by your constraint.
  Problem 2
    - Installation request for silverstripe/framework 4.0.x-dev -> satisfiable by silverstripe/framework[4.0.x-dev].
    - silverstripe/serve dev-master requires silverstripe/framework ^5 -> satisfiable by silverstripe/framework[5.x-dev].
    - Can only install one of: silverstripe/framework[5.x-dev, 4.0.x-dev].
    - Installation request for silverstripe/serve dev-master -> satisfiable by silverstripe/serve[dev-master].
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Mar 6, 2019

If someone can provide a reproducible scenario (preferably with a smaller dependency set), I'll reopen this issue again.

@alcohol alcohol closed this Mar 6, 2019
@QzCurious

This comment has been minimized.

Copy link

@QzCurious QzCurious commented May 9, 2019

Failed with --update-with-dependencies

composer.json

{
    "require": {
        "bamarni/symfony-console-autocomplete": "^1.3",
        "friendsofphp/php-cs-fixer": "^2.15",
        "phpstan/phpstan": "^0.11.5"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require-dev": {
    }
}

In terminal I did:

rm composer.lock
composer update
composer require phpactor/phpactor --update-with-dependencies

The error I got:

Using version ^0.12.0 for phpactor/phpactor
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for phpactor/phpactor ^0.12.0 -> satisfiable by phpactor/phpactor[0.12.0].
    - Conclusion: remove symfony/filesystem v4.2.8
    - Conclusion: don't install symfony/filesystem v4.2.8
    - phpactor/phpactor 0.12.0 requires symfony/filesystem ^3.3 -> satisfiable by symfony/filesystem[3.3.x-dev, 3.4.x-dev, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
    - Can only install one of: symfony/filesystem[3.3.x-dev, v4.2.8].
    - Can only install one of: symfony/filesystem[3.4.x-dev, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.0, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.0-BETA1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.0-RC1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.10, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.11, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.12, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.13, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.14, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.15, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.16, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.17, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.18, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.2, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.3, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.4, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.5, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.6, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.7, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.8, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.3.9, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA2, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA3, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA4, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-RC1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.0-RC2, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.1, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.10, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.11, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.12, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.13, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.14, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.15, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.16, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.17, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.18, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.19, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.2, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.20, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.21, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.22, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.23, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.24, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.25, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.26, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.27, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.3, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.4, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.5, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.6, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.7, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.8, v4.2.8].
    - Can only install one of: symfony/filesystem[v3.4.9, v4.2.8].
    - Installation request for symfony/filesystem (locked at v4.2.8) -> satisfiable by symfony/filesystem[v4.2.8].


Installation failed, reverting ./composer.json to its original content.

Successed with --no-update then update

After I failed I tried with --no-update:

composer require phpactor/phpactor --no-update

output:

Using version ^0.12.0 for phpactor/phpactor
./composer.json has been updated

Then update:

composer update

output (search Downgrading):

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 51 installs, 1 update, 0 removals
  - Installing webmozart/assert (1.4.0): Loading from cache
  - Installing webmozart/path-util (2.3.0): Loading from cache
  - Installing phpactor/text-document (1.0.0): Loading from cache
  - Installing phpactor/reference-finder (0.1.0): Loading from cache
  - Installing phpactor/map-resolver (1.2.0): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing phpactor/container (1.3.0): Loading from cache
  - Installing monolog/monolog (1.24.0): Loading from cache
  - Installing phpactor/logging-extension (0.3.0): Loading from cache
  - Installing phpactor/reference-finder-extension (0.1.1): Loading from cache
  - Installing phpactor/console-extension (0.1.1): Loading from cache
  - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
  - Installing phpactor/file-path-resolver (0.8.0): Loading from cache
  - Installing phpactor/file-path-resolver-extension (0.3.0): Loading from cache
  - Installing phpactor/rpc-extension (0.1.1): Loading from cache
  - Installing phpactor/reference-finder-rpc-extension (0.1.1): Loading from cache
  - Installing phpactor/composer-autoloader-extension (0.2.0): Loading from cache
  - Installing phpactor/class-to-file (0.3.0): Loading from cache
  - Installing phpactor/class-to-file-extension (0.2.0): Loading from cache
  - Installing phpactor/docblock (0.3.0): Loading from cache
  - Installing microsoft/tolerant-php-parser (v0.0.17): Loading from cache
  - Installing jetbrains/phpstorm-stubs (v2019.1): Loading from cache
  - Installing phpactor/worse-reflection (0.3.0): Loading from cache
  - Installing phpactor/worse-reflection-extension (0.2.1): Loading from cache
  - Installing phpactor/worse-reference-finders (0.1.0): Loading from cache
  - Installing phpactor/worse-reference-finder-extension (0.1.0): Loading from cache
  - Installing twig/twig (v2.9.0): Downloading (100%)         
  - Installing phpactor/code-builder (0.2.0): Downloading (100%)         
  - Installing phpactor/code-transform (0.1.1): Downloading (100%)         
  - Installing phpactor/code-transform-extension (0.1.0): Downloading (100%)         
  - Installing phpactor/config-loader (0.1.0): Downloading (100%)         
  - Installing webmozart/glob (4.1.0): Downloading (100%)         
  - Installing symfony/yaml (v3.4.27): Downloading (100%)         
  - Downgrading symfony/filesystem (v4.2.8 => v3.4.27):  Checking out acf99758b1
  - Installing sebastian/diff (2.0.x-dev abcc704): Cloning abcc70409d from cache
  - Installing phpbench/container (1.2): Downloading (100%)         
  - Installing phpactor/source-code-filesystem (0.1.0): Downloading (100%)         
  - Installing phpactor/source-code-filesystem-extension (0.1.2): Downloading (100%)         
  - Installing phpactor/path-finder (dev-master 9375374): Cloning 9375374c41 from cache
  - Installing composer/spdx-licenses (1.5.1): Downloading (100%)         
  - Installing justinrainbow/json-schema (5.2.8): Loading from cache
  - Installing seld/phar-utils (1.0.1): Loading from cache
  - Installing seld/jsonlint (1.7.1): Loading from cache
  - Installing composer/ca-bundle (1.1.4): Loading from cache
  - Installing composer/composer (1.8.5): Downloading (100%)         
  - Installing phpactor/extension-manager-extension (0.8.0): Downloading (100%)         
  - Installing phpactor/completion (0.2.1): Downloading (100%)         
  - Installing phpactor/completion-extension (0.2.0): Downloading (100%)         
  - Installing phpactor/completion-worse-extension (0.1.1): Downloading (100%)         
  - Installing phpactor/completion-rpc-extension (0.2.0): Downloading (100%)         
  - Installing phpactor/class-mover (0.1.0): Downloading (100%)         
  - Installing phpactor/phpactor (0.12.0): Downloading (100%)         
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
Writing lock file
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
@mbrodala

This comment has been minimized.

Copy link
Contributor

@mbrodala mbrodala commented Nov 28, 2019

@alcohol Can you have another look at this?

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 2, 2019

Yes I run into a similar issue now. It seems it does not want to downgrade a package in this flow. @naderman I think this is already a known bug though by now, isn't it?

[2019-12-02 09:31:16 +0100] rob@thinkpad ~ $ cd $(mktemp -d)
[2019-12-02 09:31:19 +0100] rob@thinkpad /tmp/tmp.WsEuRR4ZEc $ echo '{
>     "require": {
>         "bamarni/symfony-console-autocomplete": "^1.3",
>         "friendsofphp/php-cs-fixer": "^2.15",
>         "phpstan/phpstan": "^0.11.5"
>     },
>     "minimum-stability": "dev",
>     "prefer-stable": true,
>     "require-dev": {
>     }
> }' > composer.json
[2019-12-02 09:31:26 +0100] rob@thinkpad /tmp/tmp.WsEuRR4ZEc $ composer install --ignore-platform-reqs
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 37 installs, 0 updates, 0 removals
  - Installing ocramius/package-versions (1.5.1): Loading from cache
  - Installing symfony/process (v4.4.1): Downloading (100%)         
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v2.0.1): Downloading (100%)         
  - Installing symfony/polyfill-php73 (v1.13.1): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.13.1): Downloading (100%)         
  - Installing symfony/console (v4.4.1): Downloading (100%)         
  - Installing psr/log (1.1.2): Loading from cache
  - Installing bamarni/symfony-console-autocomplete (v1.3.5): Downloading (100%)         
  - Installing symfony/stopwatch (v5.0.1): Downloading (100%)         
  - Installing symfony/polyfill-php72 (v1.13.1): Downloading (100%)         
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing symfony/polyfill-php70 (v1.13.1): Downloading (100%)         
  - Installing symfony/options-resolver (v5.0.1): Downloading (100%)         
  - Installing symfony/finder (v4.4.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.13.1): Downloading (100%)         
  - Installing symfony/filesystem (v5.0.1): Downloading (100%)         
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
  - Installing symfony/event-dispatcher (v4.4.1): Downloading (100%)         
  - Installing php-cs-fixer/diff (v1.3.0): Loading from cache
  - Installing doctrine/lexer (1.2.0): Loading from cache
  - Installing doctrine/annotations (v1.8.0): Loading from cache
  - Installing composer/xdebug-handler (1.4.0): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing friendsofphp/php-cs-fixer (v2.16.1): Downloading (100%)         
  - Installing phpstan/phpdoc-parser (0.3.5): Loading from cache
  - Installing nikic/php-parser (v4.3.0): Downloading (100%)         
  - Installing nette/utils (v3.0.2): Downloading (100%)         
  - Installing nette/schema (v1.0.1): Downloading (100%)         
  - Installing nette/finder (v2.5.1): Downloading (100%)         
  - Installing nette/robot-loader (v3.2.0): Loading from cache
  - Installing nette/neon (v3.0.0): Loading from cache
  - Installing nette/php-generator (v3.3.1): Downloading (100%)         
  - Installing nette/di (v3.0.1): Loading from cache
  - Installing nette/bootstrap (v3.0.1): Downloading (100%)         
  - Installing jean85/pretty-package-versions (1.2): Loading from cache
  - Installing phpstan/phpstan (0.11.19): Downloading (100%)         
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/lock
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/event-dispatcher suggests installing symfony/http-kernel
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
nette/utils suggests installing ext-intl (to use Strings::webalize(), toAscii(), normalize() and compare())
nette/utils suggests installing ext-gd (to use Image)
nette/bootstrap suggests installing tracy/tracy (to use Configurator::enableTracy())
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
[2019-12-02 09:32:07 +0100] rob@thinkpad /tmp/tmp.WsEuRR4ZEc $ composer require phpactor/phpactor --update-with-dependencies --ignore-platform-reqs
Using version ^0.13.5 for phpactor/phpactor
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for phpactor/phpactor ^0.13.5 -> satisfiable by phpactor/phpactor[0.13.5].
    - Conclusion: remove symfony/filesystem v5.0.1
    - Conclusion: don't install symfony/filesystem v5.0.1
    - phpactor/phpactor 0.13.5 requires symfony/filesystem ^3.3 -> satisfiable by symfony/filesystem[3.3.x-dev, 3.4.x-dev, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
    - Can only install one of: symfony/filesystem[3.3.x-dev, v5.0.1].
    - Can only install one of: symfony/filesystem[3.4.x-dev, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.0, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.0-BETA1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.0-RC1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.10, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.11, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.12, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.13, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.14, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.15, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.16, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.17, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.18, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.2, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.3, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.4, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.5, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.6, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.7, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.8, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.3.9, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA2, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA3, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA4, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-RC1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.0-RC2, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.1, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.10, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.11, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.12, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.13, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.14, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.15, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.16, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.17, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.18, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.19, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.2, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.20, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.21, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.22, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.23, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.24, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.25, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.26, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.27, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.28, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.29, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.3, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.30, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.31, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.32, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.33, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.34, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.35, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.36, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.4, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.5, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.6, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.7, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.8, v5.0.1].
    - Can only install one of: symfony/filesystem[v3.4.9, v5.0.1].
    - Installation request for symfony/filesystem (locked at v5.0.1) -> satisfiable by symfony/filesystem[v5.0.1].


Installation failed, reverting ./composer.json to its original content.
@Seldaek

This comment has been minimized.

Copy link
Member

@Seldaek Seldaek commented Dec 7, 2019

If you can, give this a shot with the 2.0 branch. If it works there great let's move on, we're not gonna fix these edge cases in 1.x anymore. If it still fails please report a new issue with details how to repro.

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 9, 2019

@Seldaek Different output; but doesn't seem to work:

[2019-12-09 08:55:32 +0100] rob@thinkpad /code/composer/composer $ php bin/composer --working-dir=test require phpactor/phpactor --update-with-dependencies --ignore-platform-reqs
The "ocramius/package-versions" plugin was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Using version ^0.13.5 for phpactor/phpactor
./composer.json has been updated
The "ocramius/package-versions" plugin was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - symfony/filesystem is locked to version v5.0.1 and an update of this package was not requested.
    - phpactor/phpactor 0.13.5 requires symfony/filesystem ^3.3 -> satisfiable by symfony/filesystem[v3.4.36, v3.4.35, v3.4.34, v3.4.33, v3.4.32, v3.4.31, v3.4.30, v3.4.29, v3.4.28, v3.4.27, v3.4.26, v3.4.25, v3.4.24, v3.4.23, v3.4.22, v3.4.21, v3.4.20, v3.4.19, v3.4.18, v3.4.17, v3.4.16, v3.4.15, v3.4.14, v3.4.13, v3.4.12, v3.4.11, v3.4.10, v3.4.9, v3.4.8, v3.4.7, v3.4.6, v3.4.5, v3.4.4, v3.4.3, v3.4.2, v3.4.1, v3.4.0, v3.4.0-RC2, v3.4.0-RC1, v3.4.0-BETA4, v3.4.0-BETA3, v3.4.0-BETA2, v3.4.0-BETA1, v3.3.18, v3.3.17, v3.3.16, v3.3.15, v3.3.14, v3.3.13, v3.3.12, v3.3.11, v3.3.10, v3.3.9, v3.3.8, v3.3.7, v3.3.6, v3.3.5, v3.3.4, v3.3.3, v3.3.2, v3.3.1, v3.3.0, v3.3.0-RC1, v3.3.0-BETA1, 3.4.x-dev, 3.3.x-dev].
    - Same name, can only install one of: symfony/filesystem[2.1.x-dev, 2.2.x-dev, 2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev, 5.0.x-dev, dev-master, v2.1.0, v2.1.1, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.2.0, v2.2.1, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.2.10, v2.2.11, v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.36, v2.3.37, v2.3.38, v2.3.39, v2.3.40, v2.3.41, v2.3.42, v2.4.0-BETA1, v2.4.0-BETA2, v2.4.0-RC1, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.4.10, v2.5.0-BETA1, v2.5.0-BETA2, v2.5.0-RC1, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.5.10, v2.5.11, v2.5.12, v2.6.0-BETA1, v2.6.0-BETA2, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.6.10, v2.6.11, v2.6.12, v2.6.13, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.40, v2.7.41, v2.7.42, v2.7.43, v2.7.44, v2.7.45, v2.7.46, v2.7.47, v2.7.48, v2.7.49, v2.7.50, v2.7.51, v2.8.0-BETA1, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.50, v2.8.52, v3.0.0-BETA1, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0-BETA1, v3.1.0-RC1, v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.1.10, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.3.0-BETA1, v3.3.0-RC1, v3.3.0, v3.3.1, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.1.10, v4.1.11, v4.1.12, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.2.10, v4.2.11, v4.2.12, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.0, v4.4.1, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.0, v5.0.1].
    - Installation request for phpactor/phpactor ^0.13.5 -> satisfiable by phpactor/phpactor[0.13.5].


Installation failed, reverting ./composer.json to its original content.
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 9, 2019

Message is more clear now, though even with --update-with-dependencies or --update-with-all-dependencies, it refuses to downgrade symfony/filesystem.

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 9, 2019

Which should be downgrade-able:

[2019-12-09 08:57:28 +0100] rob@thinkpad /code/composer/composer $ php bin/composer --working-dir=test why symfony/filesystem:5.0.1
The "ocramius/package-versions" plugin was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
friendsofphp/php-cs-fixer  v2.16.1  requires  symfony/filesystem (^3.0 || ^4.0 || ^5.0) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.