-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Document working around conflicts of nikic/php-parser:~3 #37
Comments
This relates to phpstan/phpstan#1386 |
Makes sense to suggest using php-ast extension |
But then we'd require people to install the extension, and I don't know if PHPStan supports |
looks I mixed it with phan, sorry |
Here is the root problem: mglaman/phpstan-drupal#57 |
What is weird is that this passed: https://circleci.com/gh/mglaman/drupal-check/78 A fresh project installed the right version.
|
In case anyone is searching for this exact error, but unable to get to it, the error that got me here is |
This issue is also part of Acquia BLT generated sites. BLT 9.2 requires sensiolabs-de/deprecation-detector which has a requirement for nikic/php-parser:~3.0 |
Here's a workaround that we're using: https://www.jamesdflynn.com/development/drupal-check-site-factory-and-acquia-blt-oh-my |
The latest versions use PHPStan 0.12, which namespaces its dependencies. This prevents namespace clashes like this. I'll close for now. |
Drush requires psy which allows v2, v3, v4 of php parser. The problem is a Drupal site may have v3 installed because there is no hard requirement.
After research, this seems to be a legacy problem for sites that were set up before the v4 branch was opened. We need to find a decent workaround beyond "well, remove
composer.lock
and thevendor
directory for your project"PHP-Parser 4.0.0 on Feb 28, 2018
This means any Drupal 8 project created before Drupal 8.5.0 (7 Mar 2018) probably has the v3 branch of the PHP-Parser.
Drupal Check can probably do some detection against that Drupal project and provide helpful information for a solution.
The text was updated successfully, but these errors were encountered: