When trying to install this module using

composer require drupal/drupalmoduleupgrader

I get this error:

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

  Problem 1
    - Installation request for phpdocumentor/reflection-docblock (locked at 4.3.1) -> satisfiable by phpdocumentor/reflection-docblock[4.3.1].
    - drupal/drupalmoduleupgrader 1.x-dev requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - drupal/drupalmoduleupgrader 1.4.0 requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - Conclusion: don't install grom358/pharborist dev-master
    - Installation request for drupal/drupalmoduleupgrader ^1.4 -> satisfiable by drupal/drupalmoduleupgrader[1.x-dev, 1.4.0].


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

Using Drush gives me the "drush dl deprecated" message. Is there something I'm missing?

Comments

adamtyoung created an issue. See original summary.

mmjvb’s picture

Category: Bug report » Support request
docker@cli:/var/www$ composer require drupal/drupalmoduleupgrader --no-update
Using version ^1.4 for drupal/drupalmoduleupgrader
./composer.json has been updated
docker@cli:/var/www$ composer update drupal/drupalmoduleupgrader --dry-run
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/4:	https://ftp.drupal.org/files/projects/drupalmoduleupgrader-8.x-1.4.zip
    2/4:	https://codeload.github.com/phpDocumentor/ReflectionDocBlock/legacy.zip/e6a969a640b00d8daa3c66518b0405fb41ae0c4b
    3/4:	https://codeload.github.com/cebe/markdown/legacy.zip/8efb4268c90add2eee0edacf503ae71f22ccc745
    4/4:	https://codeload.github.com/grom358/pharborist/legacy.zip/0db9e51299a80e95b06857ed1809f59bbbab1af6
    Finished: success: 4, skipped: 0, failure: 0, total: 4
Package operations: 4 installs, 0 updates, 0 removals
  - Installing cebe/markdown (1.0.3)
  - Installing phpdocumentor/reflection-docblock (2.0.5)
  - Installing grom358/pharborist (dev-master 0db9e51)
  - Installing drupal/drupalmoduleupgrader (1.4.0)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
docker@cli:/var/www$

As shown above there is no problem with this module. Changed the category to a support request. Troubleshooting composer starts with a selfupdate. Make sure you use a recent version of composer. The information you report suggest an older version in use.
It appears that phpdocumentor/reflection-docblock is blocking, suggest to whitelist it on the update shown above. It mentions to be locked at 4.3.1 while 2.0.5 is acceptable for my environment. The whitelisting should allow it to downgrade.

This is why you should require with --no-update, so you can use update with --dry-run. You could try to update with --with-dependencies to allow the downgrade or even --with-all-dependencies.

Not convinced grom358/pharborist is an issue, hence the selfupdate of composer.

tonytheferg’s picture

I get the same error. This is the only module I have seen this error with Composer.

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

  Problem 1
    - Installation request for phpdocumentor/reflection-docblock (locked at 4.3.1) -> satisfiable by phpdocumentor/reflection-docblock[4.3.1].
    - drupal/drupalmoduleupgrader 1.x-dev requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - drupal/drupalmoduleupgrader 1.4.0 requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - Conclusion: don't install grom358/pharborist dev-master
    - Installation request for drupal/drupalmoduleupgrader ^1.4 -> satisfiable by drupal/drupalmoduleupgrader[1.x-dev, 1.4.0].


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

Composer version 1.8.6. i have installed a lot of modules with this version, I would hesitate just updating composer for the sake of one module that is not cooperating. changing this back to bug report.

tonytheferg’s picture

Category: Support request » Bug report
mmjvb’s picture

Category: Bug report » Support request

Please refrain from changing it to a bug report. As mentioned it is a support request. This is what composer does, nothing to do with this module. You have conflicting requirements that you need to solve. Provided suggestions how to achieve this, please respond to those instead of simple repeating the report.

- Did you whitelist?
- Did you use --with-dependencies or --with-all-dependencies

In your case there is no need for selfupdate, composer 1.8.6 is recent enough. Despite that it is always advised to do, due to improvements and bg fixes.

mmjvb’s picture

Status: Active » Postponed (maintainer needs more info)
tonytheferg’s picture

- Did you whitelist?
- Did you use --with-dependencies or --with-all-dependencies

No, I installed using the command provided. Maybe that command should be changed if it's not sufficient. I thought composer grabbed dependant libraries by default. That's how it's functioned on every other successful module requirement anyway.

mmjvb’s picture

Which command do you mean? There is no need to change the command provided, it gives an idea what to do and works in normal circumstances. Your need to adjust for your circumstances.

It is evident you have a poor understanding of composer. Yes, it does try to resolve your requirements and reports it when you have conflicts. Obviously, it continues when there are no conflicts. Having conflicts and resolving them should be considered normal practice. Just because you haven't experienced conflicts before doesn't mean it is doing something wrong. Resolving conflicts is part of your job, composer just reports them.

tonytheferg’s picture

The require command on the module page. You are correct, i do have a poor understanding of composer. :) I am not sure if when you say "--with-dependencies" if you mean composer require drupal/drupalmoduleupgrader --update-with-dependencies, as --with-dependencies is not a valid require command from what i've found? This is the first module I have encountered where composer doesn't get the required dependencies.

mmjvb’s picture

No, don't mean that. The --with-dependencies is for the update. The --update-with-dependencies is for the require.

Recommend the --no-update on the require to make sure your requirements are updated in the compser.json. Your changed requirements can be resolved with the update --dry-run to find out which modules to whitelist. Possible used with --with-dependencies or even --with-all-dependencies depending on the feedback you get. The --dry-run is to know up front what it wants to do. Running the same command without the --dry-run once you are happy. In your case, earlier versions of the requirements resolved in a solution no longer available due to the change in requirements. That is why it reports what is locked at certain version. That version is no longer availble due to change in requirements, hence the whitelisting to allow it downgrading.

Some people suggest not to whitelist and use the generic form of update without mentioning any module. Advise against that due to the default behavior of updating anything that can be updated. I don't like that part, only want updates to modules I allow updating. Unfortunately, there is no alternative to whitelisting, currently.

As far as poor understanding of composer, you are not alone. Remember, it wasn't meant for site builders. It is a tool for developers of php code.

tonytheferg’s picture

Are you a maintainer of the module?

Also I realized this is for the dev version, where I am getting the errors with 1.4. I don't think the conflict is with my environment, I think the conflict is between the module and composer. I might do a fresh install of the Drupal composer project and only add that module to verify the bug. Thanks for your time!

mmjvb’s picture

No, not the maintainer of this module.

This support request is about the module, not a specific version. The conflict is in your environment. Already explained why.

See for yourself:

docker@cli:/var/www$ composer show
ajaxorg/ace-builds                       1.4
alchemy/zippy                            0.4.9              Zippy, the archive manag...
asm89/stack-cors                         1.2.0              Cross-origin resource sh...
brumann/polyfill-unserialize             v1.0.4             Backports unserialize op...
cebe/markdown                            1.0.3              A super fast, highly ext...
chi-teck/drupal-code-generator           1.29.1             Drupal code generator
commerceguys/addressing                  v1.0.3             Addressing library power...
composer/installers                      v1.6.0             A multi-framework Compos...
composer/semver                          1.5.0              Semver library that offe...
consolidation/annotated-command          2.12.0             Initialize Symfony Conso...
consolidation/config                     1.2.1              Provide configuration se...
consolidation/filter-via-dot-access-data 1.0.0              This project uses dflyde...
consolidation/log                        1.1.1              Improved Psr-3 / Psr\Log...
consolidation/output-formatters          3.4.1              Format text by applying ...
consolidation/robo                       1.4.9              Modern task runner
consolidation/self-update                1.1.5              Provides a self:update c...
consolidation/site-alias                 3.0.0              Manage alias records for...
consolidation/site-process               2.0.2              A thin wrapper around th...
container-interop/container-interop      1.2.0              Promoting the interopera...
cweagans/composer-patches                1.6.5              Provides a way to patch ...
dflydev/dot-access-configuration         v1.0.3             Given a deep data struct...
dflydev/dot-access-data                  v1.1.0             Given a deep data struct...
dflydev/placeholder-resolver             v1.0.2             Given a data source repr...
dnoegel/php-xdg-base-dir                 0.1                implementation of xdg ba...
doctrine/annotations                     v1.6.1             Docblock Annotations Parser
doctrine/cache                           v1.8.0             Caching library offering...
doctrine/collections                     v1.6.2             PHP Doctrine Collections...
doctrine/common                          v2.10.0            PHP Doctrine Common proj...
doctrine/event-manager                   v1.0.0             Doctrine Event Manager c...
doctrine/inflector                       v1.3.0             Common String Manipulati...
doctrine/lexer                           1.0.2              PHP Doctrine Lexer parse...
doctrine/persistence                     1.1.1              The Doctrine Persistence...
doctrine/reflection                      v1.0.0             Doctrine Reflection comp...
drupal-composer/drupal-scaffold          2.6.1              Composer Plugin for upda...
drupal/ace_editor                        1.1.0              Ace is an embeddable cod...
drupal/acsf                              2.51.0             Connects a site with Acq...
drupal/acsf_duplication                  2.51.0             Helper module for duplic...
drupal/acsf_theme                        2.51.0             Handles VCS-based themes...
drupal/acsf_variables                    2.51.0             Stores sensitive variabl...
drupal/address                           1.6.0              Provides functionality f...
drupal/admin_toolbar                     1.26.0             Provides a drop-down men...
drupal/amptheme                          1.1.0              The AMP Base theme conve...
drupal/better_normalizers                1.0.0-beta3        Improve the normalizers ...
drupal/bricks                            1.x-dev 2dc98d4    Allows to create bricky ...
drupal/business_rules                    1.x-dev e71f1b2    Business Rules
drupal/console                           1.9.1              The Drupal CLI. A tool t...
drupal/console-core                      1.9.1              Drupal Console Core
drupal/console-en                        1.9.1              Drupal Console English L...
drupal/console-extend-plugin             0.9.2              Drupal Console Extend Pl...
drupal/contact_storage                   1.0.0-beta10       Provides storage and edi...
drupal/content_sync                      2.x-dev 0df94c4    Allows to import/export ...
drupal/context                           4.0.0-beta2        Manage contextual condit...
drupal/core                              8.7.6              Drupal is an open source...
drupal/ctools                            3.2.0              Provides a number of uti...
drupal/dbug                              1.0.0              Drupal version of ColdFu...
drupal/devel                             2.1.0              Various blocks, pages, a...
drupal/devel_php                         1.0.0              Re-add Execute PHP featu...
drupal/dropzonejs                        2.0.0-alpha4       Drupal integration for D...
drupal/drupalmoduleupgrader              1.4.0              A Drush command to updat...
drupal/ds                                3.2.0              Extend the display optio...
drupal/entity                            1.x-dev 4bed113    Provides expanded entity...
drupal/faqfield                          1.1.0              This module provides a f...
drupal/fpa                               2.x-dev 1bcf349    Fast filtering on permis...
drupal/group                             1.0.0-rc2          This module allows you t...
drupal/htmlmail                          3.0.0-alpha2       Enables HTML in system e...
drupal/language_switcher_enhanced        1.0.0-rc5          Provides a better langua...
drupal/libraries                         3.0.0-alpha1       Allows version-dependent...
drupal/mailsystem                        4.1.0              Mail System
drupal/membership                        1.x-dev 09f9163    Drupal module for handli...
drupal/metatag                           1.9.0              Manage meta tags for all...
drupal/migrate_plus                      4.1.0              Enhancements to core mig...
drupal/migrate_upgrade                   3.0.0              Drush support for direct...
drupal/module_missing_message_fixer      1.0.0-beta2        This module displays a l...
drupal/password_policy                   3.0.0-alpha5       Sets up constraints and ...
drupal/permissions_dragcheck             1.0.0              Allows to check multiple...
drupal/pfm                               1.1.0              Permissions filtered by ...
drupal/private_message                   1.2.0              A private message system...
drupal/react_comments                    1.0.0-beta1        Commenting system built ...
drupal/schema_metatag                    1.3.0              Metatag implementation o...
drupal/security_review                   1.x-dev 9b8a34a    Site security and config...
drupal/state_machine                     1.x-dev f1dc37b    Provides code-driven wor...
drupal/token                             1.5.0              Provides a user interfac...
drupal/userswitch                        1.3.0              Switch user account.
drupal/view_custom_table                 1.1.0              Extends views to use cus...
drupal/votingapi                         3.0.0-beta1        Voting API
drupal/votingapi_widgets                 1.0.0-alpha3       Voting API Widgets
drupal/webform                           5.1.0              Enables the creation of ...
drush/drush                              9.6.2              Drush is a command line ...
easyrdf/easyrdf                          0.9.1              EasyRdf is a PHP library...
egulias/email-validator                  2.1.9              A library for validating...
grasmash/expander                        1.0.0              Expands internal propert...
grasmash/yaml-expander                   1.4.0              Expands internal propert...
grom358/pharborist                       dev-master 0db9e51 Pharborist builds a synt...
guzzlehttp/guzzle                        6.3.3              Guzzle is a PHP HTTP cli...
guzzlehttp/promises                      v1.3.1             Guzzle promises library
guzzlehttp/psr7                          1.6.1              PSR-7 message implementa...
jakub-onderka/php-console-color          v0.2
jakub-onderka/php-console-highlighter    v0.4               Highlight PHP code in te...
league/container                         2.4.1              A fast and intuitive dep...
masterminds/html5                        2.6.0              An HTML5 parser and seri...
nikic/php-parser                         v4.2.1             A PHP parser written in PHP
npm-asset/jquery                         3.4.1
npm-asset/jquery-bar-rating              1.2.2
paragonie/random_compat                  v9.99.99           PHP 5.x polyfill for ran...
pear/archive_tar                         1.4.7              Tar file management clas...
pear/console_getopt                      v1.4.2             More info available on: ...
pear/pear-core-minimal                   v1.10.9            Minimal set of PEAR core...
pear/pear_exception                      v1.0.0             The PEAR Exception base ...
phpdocumentor/reflection-docblock        2.0.5
psr/container                            1.0.0              Common Container Interfa...
psr/http-message                         1.0.1              Common interface for HTT...
psr/log                                  1.1.0              Common interface for log...
psy/psysh                                v0.9.9             An interactive shell for...
ralouphie/getallheaders                  3.0.3              A polyfill for getallhea...
stack/builder                            v1.0.5             Builder for stack middle...
stecman/symfony-console-completion       0.10.1             Automatic BASH completio...
symfony-cmf/routing                      1.4.1              Extends the Symfony2 rou...
symfony/class-loader                     v3.4.29            Symfony ClassLoader Comp...
symfony/config                           v3.4.29            Symfony Config Component
symfony/console                          v3.4.29            Symfony Console Component
symfony/css-selector                     v3.4.29            Symfony CssSelector Comp...
symfony/debug                            v3.4.29            Symfony Debug Component
symfony/dependency-injection             v3.4.29            Symfony DependencyInject...
symfony/dom-crawler                      v3.4.29            Symfony DomCrawler Compo...
symfony/event-dispatcher                 v3.4.29            Symfony EventDispatcher ...
symfony/filesystem                       v3.4.29            Symfony Filesystem Compo...
symfony/finder                           v3.4.29            Symfony Finder Component
symfony/http-foundation                  v3.4.29            Symfony HttpFoundation C...
symfony/http-kernel                      v3.4.29            Symfony HttpKernel Compo...
symfony/polyfill-ctype                   v1.11.0            Symfony polyfill for cty...
symfony/polyfill-iconv                   v1.11.0            Symfony polyfill for the...
symfony/polyfill-mbstring                v1.11.0            Symfony polyfill for the...
symfony/polyfill-php70                   v1.11.0            Symfony polyfill backpor...
symfony/polyfill-php72                   v1.11.0            Symfony polyfill backpor...
symfony/process                          v3.4.29            Symfony Process Component
symfony/property-access                  v2.8.50            Symfony PropertyAccess C...
symfony/psr-http-message-bridge          v1.2.0             PSR HTTP message bridge
symfony/routing                          v3.4.29            Symfony Routing Component
symfony/serializer                       v3.4.29            Symfony Serializer Compo...
symfony/translation                      v3.4.29            Symfony Translation Comp...
symfony/validator                        v3.4.29            Symfony Validator Component
symfony/var-dumper                       v4.2.8             Symfony mechanism for ex...
symfony/yaml                             v3.4.29            Symfony Yaml Component
twig/twig                                v1.42.2            Twig, the flexible, fast...
typo3/phar-stream-wrapper                v2.1.2             Interceptors for PHP's n...
vlucas/phpdotenv                         v2.6.1             Loads environment variab...
webflo/drupal-finder                     1.1.0              Helper class to locate a...
webmozart/assert                         1.4.0              Assertions to validate m...
webmozart/path-util                      2.3.0              A robust cross-platform ...
zendframework/zend-diactoros             1.8.6              PSR HTTP Message impleme...
zendframework/zend-escaper               2.6.0              Securely and safely esca...
zendframework/zend-feed                  2.12.0             provides functionality f...
zendframework/zend-stdlib                3.2.1              SPL extensions, array ut...
docker@cli:/var/www$
mmjvb’s picture

composer show -t drupal/drupalmoduleupgrader

drupal/drupalmoduleupgrader 1.4.0 A Drush command to update Drupal 7 modules to Drupal 8.
|--cebe/markdown 1.0.*@dev
|  |--lib-pcre *
|  `--php >=5.4.0
|--drupal/core ~8.0
|  |--asm89/stack-cors ^1.1
|  |  |--php >=5.5.9
|  |  |--symfony/http-foundation ~2.7|~3.0|~4.0
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |--symfony/polyfill-mbstring ~1.1
|  |  |  |  `--php >=5.3.3
|  |  |  `--symfony/polyfill-php70 ~1.6
|  |  |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |  |     |  `--php ^7
|  |  |     `--php >=5.3.3
|  |  `--symfony/http-kernel ~2.7|~3.0|~4.0
|  |     |--php ^5.5.9|>=7.0.8
|  |     |--psr/log ~1.0
|  |     |  `--php >=5.3.0
|  |     |--symfony/debug ^3.3.3|~4.0
|  |     |  |--php ^5.5.9|>=7.0.8
|  |     |  `--psr/log ~1.0
|  |     |     `--php >=5.3.0
|  |     |--symfony/event-dispatcher ~2.8|~3.0|~4.0
|  |     |  `--php ^5.5.9|>=7.0.8
|  |     |--symfony/http-foundation ~3.4.12|~4.0.12|^4.1.1
|  |     |  |--php ^5.5.9|>=7.0.8
|  |     |  |--symfony/polyfill-mbstring ~1.1
|  |     |  |  `--php >=5.3.3
|  |     |  `--symfony/polyfill-php70 ~1.6
|  |     |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |     |     |  `--php ^7
|  |     |     `--php >=5.3.3
|  |     `--symfony/polyfill-ctype ~1.8
|  |        `--php >=5.3.3
|  |--composer/semver ^1.0
|  |  `--php ^5.3.2 || ^7.0
|  |--doctrine/annotations ^1.2
|  |  |--doctrine/lexer 1.*
|  |  |  `--php >=5.3.2
|  |  `--php ^7.1
|  |--doctrine/common ^2.5
|  |  |--doctrine/annotations ^1.0
|  |  |  |--doctrine/lexer 1.*
|  |  |  |  `--php >=5.3.2
|  |  |  `--php ^7.1
|  |  |--doctrine/cache ^1.0
|  |  |  `--php ~7.1
|  |  |--doctrine/collections ^1.0
|  |  |  `--php ^7.1.3
|  |  |--doctrine/event-manager ^1.0
|  |  |  `--php ^7.1
|  |  |--doctrine/inflector ^1.0
|  |  |  `--php ^7.1
|  |  |--doctrine/lexer ^1.0
|  |  |  `--php >=5.3.2
|  |  |--doctrine/persistence ^1.1
|  |  |  |--doctrine/annotations ^1.0
|  |  |  |  |--doctrine/lexer 1.*
|  |  |  |  |  `--php >=5.3.2
|  |  |  |  `--php ^7.1
|  |  |  |--doctrine/cache ^1.0
|  |  |  |  `--php ~7.1
|  |  |  |--doctrine/collections ^1.0
|  |  |  |  `--php ^7.1.3
|  |  |  |--doctrine/event-manager ^1.0
|  |  |  |  `--php ^7.1
|  |  |  |--doctrine/reflection ^1.0
|  |  |  |  |--doctrine/annotations ^1.0
|  |  |  |  |  |--doctrine/lexer 1.*
|  |  |  |  |  |  `--php >=5.3.2
|  |  |  |  |  `--php ^7.1
|  |  |  |  |--ext-tokenizer *
|  |  |  |  `--php ^7.1
|  |  |  `--php ^7.1
|  |  |--doctrine/reflection ^1.0
|  |  |  |--doctrine/annotations ^1.0
|  |  |  |  |--doctrine/lexer 1.*
|  |  |  |  |  `--php >=5.3.2
|  |  |  |  `--php ^7.1
|  |  |  |--ext-tokenizer *
|  |  |  `--php ^7.1
|  |  `--php ^7.1
|  |--easyrdf/easyrdf ^0.9
|  |  |--ext-mbstring *
|  |  |--ext-pcre *
|  |  `--php >=5.2.8
|  |--egulias/email-validator ^2.0
|  |  |--doctrine/lexer ^1.0.1
|  |  |  `--php >=5.3.2
|  |  `--php >= 5.5
|  |--ext-date *
|  |--ext-dom *
|  |--ext-filter *
|  |--ext-gd *
|  |--ext-hash *
|  |--ext-json *
|  |--ext-pcre *
|  |--ext-pdo *
|  |--ext-session *
|  |--ext-simplexml *
|  |--ext-spl *
|  |--ext-tokenizer *
|  |--ext-xml *
|  |--guzzlehttp/guzzle ^6.2.1
|  |  |--guzzlehttp/promises ^1.0
|  |  |  `--php >=5.5.0
|  |  |--guzzlehttp/psr7 ^1.4
|  |  |  |--php >=5.4.0
|  |  |  |--psr/http-message ~1.0
|  |  |  |  `--php >=5.3.0
|  |  |  `--ralouphie/getallheaders ^2.0.5 || ^3.0.0
|  |  |     `--php >=5.6
|  |  `--php >=5.5
|  |--masterminds/html5 ^2.1
|  |  |--ext-ctype *
|  |  |--ext-dom *
|  |  |--ext-libxml *
|  |  `--php >=5.3.0
|  |--paragonie/random_compat ^1.0|^2.0|^9.99.99
|  |  `--php ^7
|  |--pear/archive_tar ^1.4
|  |  |--pear/pear-core-minimal ^1.10.0alpha2
|  |  |  |--pear/console_getopt ~1.4
|  |  |  `--pear/pear_exception ~1.0
|  |  |     `--php >=4.4.0
|  |  `--php >=5.2.0
|  |--php ^5.5.9|>=7.0.8
|  |--stack/builder ^1.0
|  |  |--php >=5.3.0
|  |  |--symfony/http-foundation ~2.1|~3.0|~4.0
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |--symfony/polyfill-mbstring ~1.1
|  |  |  |  `--php >=5.3.3
|  |  |  `--symfony/polyfill-php70 ~1.6
|  |  |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |  |     |  `--php ^7
|  |  |     `--php >=5.3.3
|  |  `--symfony/http-kernel ~2.1|~3.0|~4.0
|  |     |--php ^5.5.9|>=7.0.8
|  |     |--psr/log ~1.0
|  |     |  `--php >=5.3.0
|  |     |--symfony/debug ^3.3.3|~4.0
|  |     |  |--php ^5.5.9|>=7.0.8
|  |     |  `--psr/log ~1.0
|  |     |     `--php >=5.3.0
|  |     |--symfony/event-dispatcher ~2.8|~3.0|~4.0
|  |     |  `--php ^5.5.9|>=7.0.8
|  |     |--symfony/http-foundation ~3.4.12|~4.0.12|^4.1.1
|  |     |  |--php ^5.5.9|>=7.0.8
|  |     |  |--symfony/polyfill-mbstring ~1.1
|  |     |  |  `--php >=5.3.3
|  |     |  `--symfony/polyfill-php70 ~1.6
|  |     |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |     |     |  `--php ^7
|  |     |     `--php >=5.3.3
|  |     `--symfony/polyfill-ctype ~1.8
|  |        `--php >=5.3.3
|  |--symfony-cmf/routing ^1.4
|  |  |--php ^5.3.9|^7.0
|  |  |--psr/log 1.*
|  |  |  `--php >=5.3.0
|  |  |--symfony/http-kernel ^2.2|3.*
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |--psr/log ~1.0
|  |  |  |  `--php >=5.3.0
|  |  |  |--symfony/debug ^3.3.3|~4.0
|  |  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |  `--psr/log ~1.0
|  |  |  |     `--php >=5.3.0
|  |  |  |--symfony/event-dispatcher ~2.8|~3.0|~4.0
|  |  |  |  `--php ^5.5.9|>=7.0.8
|  |  |  |--symfony/http-foundation ~3.4.12|~4.0.12|^4.1.1
|  |  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |  |--symfony/polyfill-mbstring ~1.1
|  |  |  |  |  `--php >=5.3.3
|  |  |  |  `--symfony/polyfill-php70 ~1.6
|  |  |  |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |  |  |     |  `--php ^7
|  |  |  |     `--php >=5.3.3
|  |  |  `--symfony/polyfill-ctype ~1.8
|  |  |     `--php >=5.3.3
|  |  `--symfony/routing ^2.2|3.*
|  |     `--php ^5.5.9|>=7.0.8
|  |--symfony/class-loader ~3.4.0
|  |  `--php ^5.5.9|>=7.0.8
|  |--symfony/console ~3.4.0
|  |  |--php ^5.5.9|>=7.0.8
|  |  |--symfony/debug ~2.8|~3.0|~4.0
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  `--psr/log ~1.0
|  |  |     `--php >=5.3.0
|  |  `--symfony/polyfill-mbstring ~1.0
|  |     `--php >=5.3.3
|  |--symfony/dependency-injection ~3.4.26
|  |  |--php ^5.5.9|>=7.0.8
|  |  `--psr/container ^1.0
|  |     `--php >=5.3.0
|  |--symfony/event-dispatcher ~3.4.0
|  |  `--php ^5.5.9|>=7.0.8
|  |--symfony/http-foundation ~3.4.27
|  |  |--php ^5.5.9|>=7.0.8
|  |  |--symfony/polyfill-mbstring ~1.1
|  |  |  `--php >=5.3.3
|  |  `--symfony/polyfill-php70 ~1.6
|  |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |     |  `--php ^7
|  |     `--php >=5.3.3
|  |--symfony/http-kernel ~3.4.14
|  |  |--php ^5.5.9|>=7.0.8
|  |  |--psr/log ~1.0
|  |  |  `--php >=5.3.0
|  |  |--symfony/debug ^3.3.3|~4.0
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  `--psr/log ~1.0
|  |  |     `--php >=5.3.0
|  |  |--symfony/event-dispatcher ~2.8|~3.0|~4.0
|  |  |  `--php ^5.5.9|>=7.0.8
|  |  |--symfony/http-foundation ~3.4.12|~4.0.12|^4.1.1
|  |  |  |--php ^5.5.9|>=7.0.8
|  |  |  |--symfony/polyfill-mbstring ~1.1
|  |  |  |  `--php >=5.3.3
|  |  |  `--symfony/polyfill-php70 ~1.6
|  |  |     |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |  |     |  `--php ^7
|  |  |     `--php >=5.3.3
|  |  `--symfony/polyfill-ctype ~1.8
|  |     `--php >=5.3.3
|  |--symfony/polyfill-iconv ^1.0
|  |  `--php >=5.3.3
|  |--symfony/process ~3.4.0
|  |  `--php ^5.5.9|>=7.0.8
|  |--symfony/psr-http-message-bridge ^1.0
|  |  |--php ^7.1
|  |  |--psr/http-message ^1.0
|  |  |  `--php >=5.3.0
|  |  `--symfony/http-foundation ^3.4 || ^4.0
|  |     |--php ^5.5.9|>=7.0.8
|  |     |--symfony/polyfill-mbstring ~1.1
|  |     |  `--php >=5.3.3
|  |     `--symfony/polyfill-php70 ~1.6
|  |        |--paragonie/random_compat ~1.0|~2.0|~9.99
|  |        |  `--php ^7
|  |        `--php >=5.3.3
|  |--symfony/routing ~3.4.0
|  |  `--php ^5.5.9|>=7.0.8
|  |--symfony/serializer ~3.4.0
|  |  |--php ^5.5.9|>=7.0.8
|  |  `--symfony/polyfill-ctype ~1.8
|  |     `--php >=5.3.3
|  |--symfony/translation ~3.4.0
|  |  |--php ^5.5.9|>=7.0.8
|  |  `--symfony/polyfill-mbstring ~1.0
|  |     `--php >=5.3.3
|  |--symfony/validator ~3.4.0
|  |  |--php ^5.5.9|>=7.0.8
|  |  |--symfony/polyfill-ctype ~1.8
|  |  |  `--php >=5.3.3
|  |  |--symfony/polyfill-mbstring ~1.0
|  |  |  `--php >=5.3.3
|  |  `--symfony/translation ~2.8|~3.0|~4.0
|  |     |--php ^5.5.9|>=7.0.8
|  |     `--symfony/polyfill-mbstring ~1.0
|  |        `--php >=5.3.3
|  |--symfony/yaml ~3.4.5
|  |  |--php ^5.5.9|>=7.0.8
|  |  `--symfony/polyfill-ctype ~1.8
|  |     `--php >=5.3.3
|  |--twig/twig ^1.38.2
|  |  |--php >=5.4.0
|  |  `--symfony/polyfill-ctype ^1.8
|  |     `--php >=5.3.3
|  |--typo3/phar-stream-wrapper ^2.1.1
|  |  |--brumann/polyfill-unserialize ^1.0
|  |  |  `--php ^5.3|^7.0
|  |  |--ext-json *
|  |  `--php ^5.3.3|^7.0
|  |--zendframework/zend-diactoros ^1.1
|  |  |--php ^5.6 || ^7.0
|  |  `--psr/http-message ^1.0
|  |     `--php >=5.3.0
|  `--zendframework/zend-feed ^2.4
|     |--ext-dom *
|     |--ext-libxml *
|     |--php ^5.6 || ^7.0
|     |--zendframework/zend-escaper ^2.5.2
|     |  `--php ^5.6 || ^7.0
|     `--zendframework/zend-stdlib ^3.2.1
|        `--php ^5.6 || ^7.0
|--grom358/pharborist dev-master
|  |--php >=5.4
|  `--phpdocumentor/reflection-docblock 2.0.*
|     `--php >=5.3.3
|--symfony/filesystem ~2.8|~3.0
|  |--php ^5.5.9|>=7.0.8
|  `--symfony/polyfill-ctype ~1.8
|     `--php >=5.3.3
`--symfony/finder ~2.8|~3.0
   `--php ^5.5.9|>=7.0.8
mmjvb’s picture

docker@cli:/var/www$ composer depends phpdocumentor/reflection-docblock
grom358/pharborist  dev-master  requires  phpdocumentor/reflection-docblock (2.0.*)
docker@cli:/var/www$

Your environment should show dependency allowing 4.3.1 because it mentions it is locked to that version. The command above should reveal which package that is. Whitelisting reflection-docblock or the package requiring it should resolve your issue.

Obviously, only when that package also allows for 2.0.*. Otherwise you have an unresolvable conflict. That means you need to address it with those packages that require reflection-dockblock: grom358/pharborist and the package allowing 4.3.1.

mmjvb’s picture

It looks like grom358/pharborist is no longer maintained. You could introduce a package repository for it allowing 4.3.1 of reflection-docblock. That assumes pharborist is able to use more recent versions of reflection-docblock.

Obviously, only when you need it together. A separate instance for drupalmoduleupgrader is probably less work.

omkar06’s picture

Version: 8.x-1.x-dev » 8.x-1.5
Status: Postponed (maintainer needs more info) » Active

Marking this ticket to Active as still facing issue to install module using composer.

I tried this module to install on the latest version of Drupal core i.e. 8.7.8 and As well as Lightning. But in both setups, I am getting below dependency error.

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

  Problem 1
    - Installation request for phpdocumentor/reflection-docblock (locked at 4.3.2) -> satisfiable by phpdocumentor/reflection-docblock[4.3.2].
    - drupal/drupalmoduleupgrader 1.x-dev requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - drupal/drupalmoduleupgrader 1.5.0 requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - Conclusion: don't install grom358/pharborist dev-master
    - Installation request for drupal/drupalmoduleupgrader ^1.5 -> satisfiable by drupal/drupalmoduleupgrader[1.x-dev, 1.5.0].

nathaniel’s picture

I had a similar issue. Adding "drupal/drupalmoduleupgrader": "1.x-dev" to composer.json require manually then running composer update seemed to work.

    "require": {
        "composer/installers": "^1.0.24",
        "wikimedia/composer-merge-plugin": "^1.4",
        "drupal/drupalmoduleupgrader": "1.x-dev"
    },
adam.bauer’s picture

# 17 worked for me, Thanks Nathaniel

ultimike’s picture

It appears that the current stable (8.x-1.5) and -dev version (18 Sept 2019) of this project are not compatible with the Drupal Composer/Drupal Project template for Drupal 8.7.* due to a dependency conflict. I tried with both a webflo/drupal-core-strict and webflo/drupal-core-require-dev versions of the template.

That being said, if you really want to use this project, you can do what I did and create a Drupal 8.2 (I'm not sure exactly which minor versions of Drupal core will work - I just randomly tried Drupal 8.2 and it was fine) site to run this project, then transfer the upgraded module to your actual project site.

I suspect that the disconnect happened going from Drupal core 8.6 -> 8.7. I think that the dependencies for this project need to be updated, but I'm not 100% sure.

-mike

chipway’s picture

#17 + composer update --with-dependencies installation worked for me on a Drupal 8.7.10 installed some time ago with https://github.com/drupal-composer/drupal-project/ Composer/Drupal Project template.

composer update --with-dependencies> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 1 update, 2 removals
- Removing phpdocumentor/type-resolver (1.0.1)
- Removing phpdocumentor/reflection-common (2.0.0)
- Installing cebe/markdown (1.0.3): Downloading (100%)
- Downgrading phpdocumentor/reflection-docblock (4.3.2 => 2.0.5): Loading from cache
- Installing grom358/pharborist (dev-master 0db9e51): Cloning 0db9e51299 from cache
- Installing drupal/drupalmoduleupgrader (1.5.0): Downloading (100%)

schillerm’s picture

#17 worked for me!

drupal.ninja03’s picture

Thanks @nathaniel. #17 worked for me.

binnythomas’s picture

Thanks @Nathaniel #17 worked for me as well.

lennart’s picture

#17 does NOT seems to work with drupal 9.0.7

Nor does it work without that change with neither drupalmoduleupgrader 8.x-1.5 nor 8.x-1.x-dev

with

drupal/recommended-project

with these in require:
composer/installers: ^1.9,
drupal/core-composer-scaffold: ^9,
drupal/core-project-message: ^9,
drupal/core-recommended: ^9,

gisle’s picture

I had a similar problem ("Your requirements could not be resolved to an installable set of packages") on one of my sites:

Environment:

  • drupal/recommended-project
  • drupal ver. 8.9.7
  • drush 10.3.5
  • composer 2.0.4

For what it is worth, the thermonuclear option worked for me. i.e.:

rm composer.lock
rm -rf vendor
composer install
composer require 'drupal/drupalmoduleupgrader:^1.5'
drush en drupalmoduleupgrader -y
drush dmu-analyze my_project
Indexing...
done.

However, in #3158087: "Command is not defined" ...after install. Drupal 8.9, Drush 9.7.2 mmjvb advice against doing this (I don't grok composer and don't understand why this is bad).

gold’s picture

Category: Support request » Bug report

I would like to suggest that this does get elevated to a Bug Report. However, the actual bug resides in a requirement of a module this one requires.

I just submitted a patch on issue #3180085 and the patch test pipeline failed at the composer require step with this same error.

c.f., https://www.drupal.org/pift-ci-job/1869633

At this point I would be inclined to think that this isn't a conflict in the environment @TonyTheFerg has, as suggested at comment #12.

Looking at composer.json for this module it is including the following;

"grom358/pharborist": "dev-master"

Using dev-master here is incredibly unstable and should likely be updated to a known state. However, in this case this module has not been updated since 2015 so that isn't likely to be the source of the issue.

Looking at the actual problem:

Problem 1
    - drupal/drupalmoduleupgrader 1.x-dev requires grom358/pharborist dev-master -> satisfiable by grom358/pharborist[dev-master].
    - Installation request for drupal/drupalmoduleupgrader 1.x-dev -> satisfiable by drupal/drupalmoduleupgrader[1.x-dev].
    - Conclusion: remove phpdocumentor/reflection-docblock 4.3.4
    - Conclusion: don't install phpdocumentor/reflection-docblock 4.3.4
    - grom358/pharborist dev-master requires phpdocumentor/reflection-docblock 2.0.* -> satisfiable by phpdocumentor/reflection-docblock[2.0.0, 2.0.0a1, 2.0.0a2, 2.0.0a3, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.0, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.0a1, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.0a2, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.0a3, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.1, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.2, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.3, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.4, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[2.0.5, 4.3.4].
    - Installation request for phpdocumentor/reflection-docblock (locked at 4.3.4) -> satisfiable by phpdocumentor/reflection-docblock[4.3.4].

grom358/pharborist requires "phpdocumentor/reflection-docblock": "2.0.*".

So, what else depends on phpdocumentor/reflection-docblock?

me@host:~/path/to/project $ composer depends phpdocumentor/reflection-docblock
grom358/pharborist  dev-master  requires  phpdocumentor/reflection-docblock (2.0.*)                  
phpspec/prophecy    v1.10.3     requires  phpdocumentor/reflection-docblock (^2.0|^3.0.2|^4.0|^5.0) 

At this point we can see that phpspec/prophecy also requires phpdocumentor/reflection-docblock and has a much larger range of viable versions to select from. In turn, if we call composer depends phpspec/prophecy we can see that this is installed as part of the initial Drupal install.

From Problem 1 above we can see that phpdocumentor/reflection-docblock is "locked at 4.3.4". This will be because 4.3.4 met the requirements at the time. The later addition of drupalmoduleupgrader and it's subsequent requirements is what actually caused the issue.

This also explains why adding the module to the composer.json and deleting the vendor directory works as composer can work out a version of phpdocumentor/reflection-docblock that satisfies all requirements.

So, this is a Bug Report and it is not related to any individual developers environment.

The solution is to either replace grom358/pharborist or resolve the issue there.

Another thing to consider is that this is a utility module and unlikely to ever be deployed to other environments. An instruction in the README explaining the versioning issue and a simple rm -rf /path/to/vendor doesn't feel that bad as a work around.

mmjvb’s picture

Category: Bug report » Support request

No, still a support request because your circumstances involve the additional requirement which resolves into a conflict when changing requirements. Happens all the time! You just need to whitelist phpspec/prophecy and any other package that may cause a conflict.

In the end there might be no way to resolve conflict free, then it is time to request changes to package version constraints. Obviously, with the package involved, not the packages that use it. Welcome to dependency management !

joseph.olstad’s picture

joseph.olstad’s picture

Title: Composer install fails » Composer install fails, Head tests also failing
Priority: Normal » Major
jcnventura’s picture

Thanks for the analysis here people. Let me try something...

  • jcnventura committed 471ff29 on 8.x-1.x
    Issue #3072073 by jcnventura: Update composer dependencies to prevent...
jcnventura’s picture

Status: Active » Fixed

OK. My experiment worked. I've switched over to my own fork of grom358/pharborist, which I maintain and can easily figure out any further issues.

Note that I haven't been actively using this module for some time (already upgraded most of my D7 stuff over to D8 and now D9, so I'm no longer actively using this module.. That being said, I need people to test these changes, and RTBC whatever can be RTBCd, please.

gisle’s picture

jcnventura,
thanks for fixing this! I still very much rely in this.

joseph.olstad’s picture

great work jcnventura! Thanks!

joseph.olstad’s picture

8.x is fixed

Openned a new issue for 9.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.