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

marcingy’s picture

Project: Drupal core » Drush
Version: 8.x-dev » 8.x-6.x-dev
Component: base system » Base system (internal API)

Sending to drush queue as maintainers can determine if it is a drush or core issue.

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

please post full debug log. there are a lot of known issues with d8 as that system changes daily.

C13L0’s picture

Hi I am receiving the same error. Using drupalpro as a test environment.

Fatal error: Class 'Drupal\Component\Utility\Settings' not found in /home/drupalpro/websites/d8test.dev/core/includes/bootstrap.inc on line 982

Call Stack:
    0.0058     372576   1. {main}() /home/drupalpro/drush/drush.php:0
    0.1219    3113004   2. drush_main() /home/drupalpro/drush/drush.php:14
    0.5988    7482876   3. _drush_bootstrap_and_dispatch() /home/drupalpro/drush/drush.php:59
    0.7139    7486792   4. drush_bootstrap_to_phase() /home/drupalpro/drush/drush.php:79
    0.7213    7488820   5. drush_bootstrap() /home/drupalpro/drush/includes/bootstrap.inc:308
    0.7260    7489848   6. _drush_bootstrap_drupal_root() /home/drupalpro/drush/includes/bootstrap.inc:185
    0.8431    9042252   7. dt() /home/drupalpro/drush/includes/bootstrap.inc:696
    0.8432    9042252   8. drupal_classloader() /home/drupalpro/drush/includes/output.inc:140
    0.8483    9080692   9. settings() /home/drupalpro/websites/d8test.dev/core/includes/bootstrap.inc:3108


Fatal error: Class 'Drupal' not found in /home/drupalpro/websites/d8test.dev/core/includes/bootstrap.inc on line 2414

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

oenie’s picture

Be 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.

oenie’s picture

Be 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

oenie’s picture

From 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.

greg.1.anderson’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This 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.

vishal.sirsodiya’s picture

Issue summary: View changes

Hi,

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.

D:\Drupal\site\website\docroot>drush cr
PHP Fatal error: Class 'Drupal\Core\StringTranslation\PluralTranslatableMarkup' not found in D:\Drupal\site\website\docroot\core\includes\common.inc on line 132

Fatal error: Class 'Drupal\Core\StringTranslation\PluralTranslatableMarkup' not found in D:\Drupal\site\website\docroot\core\includes\common.inc on line 132
Drush command terminated abnormally due to an unrecoverable error. ?[31;40m?[1m[error]?[0m
Error: Class 'Drupal\Core\StringTranslation\PluralTranslatableMarkup' not found in
D:\Drupal\site\website\docroot\core\includes\common.inc, line 132