Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
While running drush command I am getting following error:
PHP Fatal error: Class 'Drupal\Component\Utility\Settings' not found in /var/www/drupal/core/includes/bootstrap.inc on line 982
PHP Fatal error: Class 'Drupal' not found in /var/www/drupal/core/includes/bootstrap.inc on line 2414
- Drush is working fine on same server with Drupal 7.
- OS: Ubuntu 12.10
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedSending to drush queue as maintainers can determine if it is a drush or core issue.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedplease post full debug log. there are a lot of known issues with d8 as that system changes daily.
Comment #3
C13L0 CreditAttribution: C13L0 commentedHi I am receiving the same error. Using drupalpro as a test environment.
Please let me know if I can provide any additional information. Wasn't sure exactly how to run a debug.
Edit: Just a note that drush is completely unusable with d8 but works fine with d7
Comment #4
oenie CreditAttribution: oenie commentedBe sure to be using the correct PHP & drush version.
For Drupal 8 you need drush 6 (the drush 8.x-6.x branch) , or you will indeed be unable to use drush for Drupal 8.
PHP version is > 5.3.10 i think, 5.4.4 works fine for me.
As a matter of fact, it turns out i ended up at this issue because i was in a terminal where i forget to set the correct drupal version.
So this issue definitely is because you are using the wrong drush version.
Install the drush 6 version in a different directory, and make sure your PATH variable in your console points to the bin directory of this new drush version.
That should fix your problem.
Comment #5
oenie CreditAttribution: oenie commentedBe sure to check the version of the drush command you are running in your terminal by running drush --version.
That should say:
Drush Version : 6.0-dev
Comment #6
oenie CreditAttribution: oenie commentedFrom a user point of view, it might be interesting to have an alias for both drush versions.
That way you can do d5 for drush v5 (Drupal 7) and d6 for drush v6 (Drupal 8).
If the above assumption proved right in your cases, please be sure to mark this issue as fixed or closed (works as designed)
That way issues aren't left open.
Comment #7
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis issue was marked
closed (won't fix)
because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate)
.Please ask support questions on Drupal Answers.
Comment #8
vishal.sirsodiya CreditAttribution: vishal.sirsodiya commentedHi,
I am using drush for drupal caches clear, module enable/disable and so more commands.
My drush version is 5.4, it working fine for drupal 7 but now i creating new product in drupal 8.
I am using same drush commands for drupal 8. but I am facing below problems.