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

Dependency issues if you have other Drupal related packages required in composer global #23

Closed
nikunjkotecha opened this issue Apr 1, 2019 · 9 comments

Comments

@nikunjkotecha
Copy link

$ composer global require mglaman/drupal-check
Changed current directory to /Users/nikunj/.composer
Using version ^1.0 for mglaman/drupal-check
./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
    - Conclusion: don't install mglaman/drupal-check 1.0.5
    - Conclusion: don't install mglaman/drupal-check 1.0.4
    - Conclusion: don't install mglaman/drupal-check 1.0.3
    - Conclusion: don't install mglaman/drupal-check 1.0.2
    - Conclusion: don't install mglaman/drupal-check 1.0.1
    - Conclusion: remove symfony/console v3.4.21
    - Installation request for mglaman/drupal-check ^1.0 -> satisfiable by mglaman/drupal-check[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5].
    - Conclusion: don't install symfony/console v3.4.21
    - mglaman/drupal-check 1.0.0 requires symfony/console ^4.2 -> satisfiable by symfony/console[v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4].
    - Can only install one of: symfony/console[v4.2.0, v3.4.21].
    - Can only install one of: symfony/console[v4.2.1, v3.4.21].
    - Can only install one of: symfony/console[v4.2.2, v3.4.21].
    - Can only install one of: symfony/console[v4.2.3, v3.4.21].
    - Can only install one of: symfony/console[v4.2.4, v3.4.21].
    - Installation request for symfony/console (locked at v3.4.21) -> satisfiable by symfony/console[v3.4.21].


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

Contents of ~/.composer/composer.json

{
    "require": {
        "hirak/prestissimo": "^0.3.8",
        "drush/drush-launcher": "^0.6.0",
        "zaporylie/composer-drupal-optimizations": "^1.0",
        "drupal/coder": "^8.3"
    }
}
@nikunjkotecha
Copy link
Author

As discussed in Drupal slack, current work around is to follow instructions from https://github.com/mglaman/drupal-check/wiki/Drupal-9-Readiness and use the phar version, I haven't tried yet, will try and update.

@mglaman
Copy link
Owner

mglaman commented Apr 1, 2019

I blame zaporylie/composer-drupal-optimizations or drush/drush-launcher. The former because drupal/core is a dev dependency. The latter... because it seems likely :)

@nikunjkotecha nikunjkotecha changed the title Dependency issues if you have drupal/coder required in composer global Dependency issues if you have other Drupal related packages required in composer global Apr 1, 2019
@nikunjkotecha
Copy link
Author

It was zaporylie/composer-drupal-optimizations, after removing it, I was able to install drupal-check

thanks @mglaman @zaporylie

@bajahranks
Copy link

drush/drush 9.6.2 requires symfony/console ^3.4 -> satisfiable by symfony/console[3.4.x-dev].

where as drupal-check require symfony/console v4.2

@potterme
Copy link

I am also running into this issue. I need this to run with local project composer and not globally. Using the phar is not really the best practice for this.

There are several dependencies that cause this. drush is mentioned above. behat is another. All of these could be fixed if drupal-check allowed symfony/console 3.4. I recommend changing the composer requirement to:
"symfony/console": "~3.2 || ~3.4 || ~4.0"

@mike-potter
Copy link

(sorry, above comment was from me...was logged into wrong gitlab account)

@mglaman
Copy link
Owner

mglaman commented Apr 29, 2019

This was done, and I think it was released. Can you try upgrading?

@mike-potter
Copy link

When I looked here at the composer.json in the "master" branch, it still says:
"symfony/console": "~3.2 || ~4.0",
Should I be looking somewhere else?

@mglaman
Copy link
Owner

mglaman commented Apr 29, 2019

Oh, dur I missed the ~3.4

@mike-potter mind opening a specific issue on that? I have tests running against this.

  test_global_require_with_drush:
    <<: *defaults
    steps:
      - start-project
      - run:
          name: Install Drush globally (which is not recommended by Drush team)
          command: |
            composer global require drush/drush
      - global-require

so I'd like to have better coverage against it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants