-
-
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
Drupal vendor directory not discovered #15
Comments
Weird! We're using For example
That's what this should be doing:
Can you run with
It will help debug DrupalFinder's output |
The correct path is |
Thanks! I need to add testing. TravisCI makes pipelines difficult, so I might need to switch to CircleCI so I can run better integration tests. That is very odd. I will give it a shot on an Acquia style project. |
Sorry I missed
|
I have not been able to reproduce this despite trying several Drupal project setups |
Same here, with a blt 9.2.3 project and the global composer package. The vendor symlink did not work for me but downloading the phar did. |
Same error here. With
The error message is
Running |
I guess the $composerAutoloadFile = __DIR__ . '/vendor/autoload.php';
//$composerAutoloadFile = realpath(__DIR__ . '/../../../vendor/autoload.php');
echo "File: " . __FILE__ . PHP_EOL;
echo "Dir: " . __DIR__ . PHP_EOL;
echo "Composer: " . $composerAutoloadFile . PHP_EOL;
if (file_exists($composerAutoloadFile)) {
require $composerAutoloadFile;
} else {
echo "Could not find my own composer autoload file in $composerAutoloadFile." . PHP_EOL;
echo "You need to run 'composer install'." . PHP_EOL;
exit(1);
} gives
then changing //$composerAutoloadFile = __DIR__ . '/vendor/autoload.php';
$composerAutoloadFile = realpath(__DIR__ . '/../../../vendor/autoload.php'); makes the tool run but fail to load the
Trying to fix for the includes:
- ../../phpstan-drupal/extension.neon
- ../../phpstan-drupal-deprecations/rules_and_deprecations_testing.neon
- base_config.neon
- junit_formatter.neon as that ended up into
Hope that helps? |
I'm having a similar issue with a globally installed drupal-check. Whether I use |
Can you all please try the Phar? Composer global packages are just a nightmare. |
Maybe its best then to update the README.md as it offers 3 different ways and I prefer composer over phar so waisted your (and my) time :-) I did d8 $ drupal-check.phar modules/contrib/external_entities/
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. I have a git checkout of D8 which is not as per your instructions ( |
I have, with the above result. How to debug further? |
|
I'm closing this. As I think the root problem was 1.0.8 fixes |
I have a somewhat similar problem. I'm trying to run drupal-check against modules inside a profile, which is required via composer.
I'm guessing this comes from locating root from the path argument. Is it possible that drupal-check can locate root from the current directory from where we run the command instead?
Maybe it's an issue with drupal-finder? Not sure how it determines the profile as root. |
I just tried changing to
|
@johnzzon can you open a new issue? I'd very curious why it thought the profile was the webroot. |
Using the
and then it worked. |
I downloaded drupal-check.phar , doing
php drupal-check.phar -V
results in Drupal Check 1.0.5. But when I attempt to run it fromdocroot
I get aCould not find autoload file.
error message. I did anln -s ../vendor
which made it work. We have a drupal-project install with docroot and vendor in the repo root. Running from the repo didn't fix this.Thanks for super useful utility!
The text was updated successfully, but these errors were encountered: