I'm trying to use this module on a site that is currently running php 5.6 and drupal 8.5.14 BUT I am running the project locally with Lando, so I've specified php 7.2 in my lando.local.yml .
When I try to lando composer require drupal/upgrade_status ^1.0, it fails to install with this message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for nikic/php-parser (locked at v3.1.5) -> satisfiable by nikic/php-parser[v3.1.5].
- drupal/upgrade_status 1.x-dev requires mglaman/phpstan-drupal 0.11.3 -> satisfiable by mglaman/phpstan-drupal[0.11.3].
- drupal/upgrade_status 1.0.0-alpha1 requires mglaman/phpstan-drupal 0.11.3 -> satisfiable by mglaman/phpstan-drupal[0.11.3].
- Conclusion: don't install mglaman/phpstan-drupal 0.11.3
- Installation request for drupal/upgrade_status ^1.0 -> satisfiable by drupal/upgrade_status[1.x-dev, 1.0.0-alpha1].
I can't simply NOT install one of the module's dependencies, so what do I do?
Comments
Comment #2
bhogue commentedComment #3
bhogue commentedI had to explicitly require phpstan-drupal and php-parser via composer to get upgrade_status to successfully install:
Once I did that, when I went to activate the module through the Drupal admin, I got this error
Note that I also upgraded Drupal core from 8.5.14 to 8.6.14. When I did so, I did
composer update drupal/core --with-dependencies.Comment #4
hotwebmatter commentedRelevant info here:
https://github.com/mglaman/phpstan-drupal/issues/57
Comment #5
mglamanHere's the root problem: https://github.com/mglaman/phpstan-drupal/issues/57
Comment #6
gábor hojtsy@bhogue did that actually end up getting you v4 of PHP parser? As per https://github.com/mglaman/phpstan-drupal/issues/57 even if we require it composer would not comply. If you did not get v4, can you try removing drush and then composer updating and then adding drush again?
Comment #7
mglamanFor the record, #3 is the required approach to fix the dependency. Weird on the second error.
Comment #8
gábor hojtsyLooks like there is not much here but to document that this is how it is.
Comment #9
gábor hojtsyI added this to the project page in hopes that I understand the scope of the problem. Let me know what to update it to, happy to do so.
Comment #10
aangel commentedUnfortunately, I had no luck at all installing this module on a Drupal 8.7.3 / Drush 9.7.0 project (running inside Lando). Always deleting composer.lock and removing nikic from the vendor directory between tests, I tried:
Adding "drupal/upgrade_status". That failed.
Adding "nikic/php-parser": "^4.2" (while keeping "drupal/upgrade_status"). That failed.
Then I removed both of the above and removed drush and added mglaman/phpstan-drupal. That failed.
Then I removed phpstan-drupal and went back to just "nikic/php-parser:^4.2.2" again and got:
It's not clear to me where to go from here.
Comment #11
mglaman#10 is a conflict with acquia/blt 9: https://github.com/mglaman/drupal-check/issues/9
Comment #13
aangel commentedThanks, Matt. We had removed BLT—mostly. Missed removing deprecation-detector.
With that gone the module installs and runs nicely.