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

symfont/console dependency conflicts with other packages #57

Closed
mike-potter opened this issue Apr 30, 2019 · 5 comments · Fixed by #60
Closed

symfont/console dependency conflicts with other packages #57

mike-potter opened this issue Apr 30, 2019 · 5 comments · Fixed by #60
Labels
help wanted Extra attention is needed needs more information Further information is requested

Comments

@mike-potter
Copy link

This is split from #23 that was closed.

Basically, the:
"symfony/console": "~3.2 || ~4.0",
in composer.json is causing drupal-check to conflict with some popular packages when trying to install locally within a project.

Some packages that require ^3.4 are:
drush/drush: "symfony/console": "^3.4",
behat/behat: "symfony/console": "~2.7.40||^2.8.33||~3.3.15||^3.4.3||^4.0.3"

Unless there is a specific reason 3.4 is being excluded from drupal-check, I recommend changing the composer.json to:
"symfony/console": "~3.2 || ~3.4 || ~4.0"

The more compatibility we can get here, the more we can encourage people to start checking their existing code to make projects ready for Drupal 9.

@mglaman
Copy link
Owner

mglaman commented May 1, 2019

Thanks! I'm just confused why the Drush test passed in global.

See: https://circleci.com/gh/mglaman/drupal-check/68

  • Drush installed first
Changed current directory to /home/circleci/.composer
Using version ^9.6 for drush/drush
./composer.json has been updated
  - Installing symfony/debug (v4.2.7): Loading from cache
  - Installing symfony/console (v3.4.26): Loading from cache
  - Installing jakub-onderka/php-console-color (v0.2): Loading from cache

Then drupal-check installs without a problem.

🤔 would ~3 be fine? so ~3 || ~4.0

Also, according to https://semver.mwl.be/#?package=symfony%2Fconsole&version=~3.2%20%7C%7C%20~4.0&minimum-stability=stable there should be no conflict against 3.4

Screen Shot 2019-05-01 at 10 23 43 AM

Can you provide a failing scenario?

@mglaman mglaman added help wanted Extra attention is needed needs more information Further information is requested labels May 1, 2019
@mike-potter
Copy link
Author

mike-potter commented May 1, 2019

Yes! Actually using ~3 would be best unless there was some reason you needed to pin to >3.2 for some reason.

My failing scenario is just having a composer.json that has
"behat/behat": "^3.0",
"drush/drush": "^9",
"mglaman/drupal-check": "^1"

I don't still have the composer log since it failed as drupal-check is only a "nice to have" right now and I had to move to higher-priority tasks. But the composer errors pointed to the ^3.2 in drupal-check conflicting with the existing 3.4 version that was in our composer.lock (from before we added drupal-check to the project)

Your semver output above makes sense, so maybe this is also just some composer issue. But I expect others will run into this since literally all I tried to do in my project was: composer require mglaman/drupal-check in an existing working project.

@mglaman
Copy link
Owner

mglaman commented May 1, 2019

Yeah. When the .lock has data and adding something new... It gets freaky sometimes. That's the issue with Drupal sites first created <8.5. Drush was installed and added v3 of the parser and now v4 is valid.

Fun times!

@mglaman
Copy link
Owner

mglaman commented May 3, 2019

Got a failing test!

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

  Problem 1
    - Conclusion: don't install mglaman/drupal-check 1.0.8
    - Conclusion: don't install mglaman/drupal-check 1.0.7
    - Conclusion: don't install mglaman/drupal-check 1.0.6
    - 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.27
    - 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, 1.0.6, 1.0.7, 1.0.8].
    - Conclusion: don't install symfony/console v3.4.27
    - 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, v4.2.5, v4.2.6, v4.2.7, v4.2.8].
    - Can only install one of: symfony/console[v4.2.0, v3.4.27].
    - Can only install one of: symfony/console[v4.2.1, v3.4.27].
    - Can only install one of: symfony/console[v4.2.2, v3.4.27].
    - Can only install one of: symfony/console[v4.2.3, v3.4.27].
    - Can only install one of: symfony/console[v4.2.4, v3.4.27].
    - Can only install one of: symfony/console[v4.2.5, v3.4.27].
    - Can only install one of: symfony/console[v4.2.6, v3.4.27].
    - Can only install one of: symfony/console[v4.2.7, v3.4.27].
    - Can only install one of: symfony/console[v4.2.8, v3.4.27].
    - Installation request for symfony/console (locked at v3.4.27) -> satisfiable by symfony/console[v3.4.27].


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

@mglaman
Copy link
Owner

mglaman commented May 3, 2019

I think I just need to tag 1.0.9.

Looking at: https://packagist.org/packages/mglaman/drupal-check

1.0.8 - symfony/console: ^4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs more information Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants