-
-
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
Lightning - Could not find autoload file #102
Comments
I had this issue with lightning_core. It is because DrupalCheck incorrectly assumes that lightning_core is the docroot. |
BTW, we had temporarily hard coded "this->vendorRoot" in /lightning/vendor/mglaman/drupal-check/src/Command/CheckCommand.php to test the deprecations for Lightning modules. That way we were able to progress for the time being. |
I see in the docs that there's a |
Ah, it looks like that's not actually in a released version. I submitted a PR for achieving this with an environmental variable, which may no longer be necessary: |
This does not solve the issue (not even Lightning-specific): the code incorrectly assumes $this->vendorDir is in one level below $this->rootDir, although in composer-project or drupal-recommended layouts it is an "uncle" of the rootDir. It could find the vendor location using the Composer libraries instead of guessing, but doesn't do it. |
We directories are determined by the Drupal finder library. It doesn't make any assumptions beyond that. It just passes the Drupal root value to |
Yes, the problem is in the drupalFinder resolution, as described above. The question is whether there is a way to initialize the finder to avoid the problem. |
We have setup Lightning locally as per the steps below,
git clone --branch 8.x-4.x https://git.drupalcode.org/project/lightning.git
composer install
We have also setup drupal-check at project level and trying to run it against couple of Lightning modules but getting "Could not find autoload file." error,
➜ lightning git:(8.x-4.x) ✗ ./vendor/bin/drupal-check -d docroot/modules/contrib/lightning_layout
Could not find autoload file.
We tried to debug this by printing $this->vendorRoot at line 108 in /lightning/vendor/mglaman/drupal-check/src/Command/CheckCommand.php and got
this->vendorRoot: /lightning/docroot/modules/contrib/lightning_layout/vendor
Not sure if it should look for "vendor" folder at root level or "lightning_layout/vendor".
We are able to run drupal-check against other modules successfully which are part of Lightning,
➜ lightning git:(8.x-4.x) ✗ ./vendor/bin/drupal-check -d docroot/modules/contrib/token
Any idea?
The text was updated successfully, but these errors were encountered: