Drupal-console: Error: Call to undefined method Symfony\Component\DependencyInjection\Definition::setDeprecated

Created on 5 Apr 2016  路  6Comments  路  Source: hechoendrupal/drupal-console

When doing using the cr command with 8.1 and v0.11.1:

$ ../drupal.phar cr
 Select cache. [all]:
 > 

 Rebuilding cache(s), wait a moment please.
PHP Fatal error:  Uncaught Error: Call to undefined method Symfony\Component\DependencyInjection\Definition::setDeprecated() in /home/josh/www/something/vendor/symfony/dependency-injection/DefinitionDecorator.php:167
Stack trace:
#0 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(194): Symfony\Component\DependencyInjection\DefinitionDecorator->setDeprecated(true, '%service_id%-no...')
#1 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(120): Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinition('entity.manager', Array, 'core/core.servi...')
#2 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(100): Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinitions(Array, 'core/core.servi...')
#3 /home/josh/www/something/core/lib/Drupal/Core/DrupalKernel.php(1165): Drupal\Core\DependencyInjection\YamlFileLoader->load('core/core.servi...')
#4 /home/josh/www/something/core/lib/Drupal/Core/Dru in /home/josh/www/something/vendor/symfony/dependency-injection/DefinitionDecorator.php on line 167

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\DependencyInjection\Definition::setDeprecated() in /home/josh/www/something/vendor/symfony/dependency-injection/DefinitionDecorator.php:167
Stack trace:
#0 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(194): Symfony\Component\DependencyInjection\DefinitionDecorator->setDeprecated(true, '%service_id%-no...')
#1 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(120): Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinition('entity.manager', Array, 'core/core.servi...')
#2 /home/josh/www/something/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(100): Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinitions(Array, 'core/core.servi...')
#3 /home/josh/www/something/core/lib/Drupal/Core/DrupalKernel.php(1165): Drupal\Core\DependencyInjection\YamlFileLoader->load('core/core.servi...')
#4 /home/josh/www/something/core/lib/Drupal/Core/Dru in /home/josh/www/something/vendor/symfony/dependency-injection/DefinitionDecorator.php on line 167
bug

Most helpful comment

New DC will be released today with support for 8.1.0

All 6 comments

@joshuataylor: Drupal 8.1 requires symfony components 2.8 while 8.0 requires 2.7 we are planning to tag a new version for DC 1.0.0-alpha1 including support for 8.1 once 8.1.0-rc11.

We will update DC dependencies once a stable version of Drupal 8.1.x got release

FYI: Drupal 8.1.0 has now been released.

New DC will be released today with support for 8.1.0

Drupal Console v1.0.0-alpha1 is release, providing support for 8.1.x and dropping support for 8.0.1

For anyone struggling with how to install the alpha version that works with 8.1, follow the directions on the main page of Drupal Console, but change this line:

php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar

to:

php -r "readfile('https://github.com/hechoendrupal/DrupalConsole/releases/download/1.0.0-alpha1/drupal.phar');" > drupal.phar

Then follow the rest of the directions. Took me a bit to figure how to get and install the alpha version because "drupal self:update" won't work for this.

Anyway, can confirm the Alpha version fixes this error.

Was this page helpful?
0 / 5 - 0 ratings