Problem/Motivation

Today I run the git pull command, I got some updated code. When I run drupal cache:rebuild all (using drupal console). I got the following error (image uploaded). I tried to cache clear from admin/config/development/performance, cache was cleared successfully.

Fatal error image

I tried to find out the issue from the class YamlFileLoader.php-
Here is the actual object Initiates-

       if (isset($service['parent'])) {
            $definition = new DefinitionDecorator($service['parent']);
        } else {
            $definition = new Definition();
        }

It's look like OK. But I don't know why I got this error from my terminal.

CommentFileSizeAuthor
fatal-error-drupal-core-8.2.x.png210.64 KBimrancluster

Comments

imrancluster created an issue. See original summary.

dawehner’s picture

Just an idea, did you forgot to composer install after your update?

imrancluster’s picture

@dawehner , No, I didn't forgot to run the command. But I am still facing the problem.

joelpittet’s picture

Version: 8.2.x-dev » 8.1.x-dev
Priority: Minor » Normal

I can confirm composer install has been run as well and i'm seeing this on the latest 8.1.x branch.
I just ran this command through drupal console when I noticed it:
drupal site:mode dev

Same callstack in the error. This is a bug so we can put it in 8.1.x

imrancluster’s picture

Yesterday, I tried to install Drupal 8 latest beta version using drupal console in my Mac laptop. Whey I run drupal site:install , I got the same error. But I followed the same steps in my office linux (ubuntu) , fortunately I didn't see any error, every drupal console command was working smoothly.

I am not sure, Is it my laptop ( mac os x ) problem or a bug.

joelpittet’s picture

Ah I found it!

Drupal console is using a different version of DefinitionDecorator.

DrupalConsole is missing setDeprecated()
DrupalConsole/vendor/symfony/dependency-injection/DefinitionDecorator.php

D8 has it
vendor/symfony/dependency-injection/DefinitionDecorator.php

Added here.
https://github.com/symfony/symfony/commit/83f4e9cf4576fd5efb7ecfe8f7acc5...

Reason: drupal uses ~2.8|~3.0.0 for dependency-injection and drupal composer uses ~2.7

So I guess it would have to upgrade?

joelpittet’s picture

mixel’s picture

Thanks for the Drupalconsole link joelpittet.

A short summery (as far as I understood) => Drupalconsole 0.11 version works for D8.0. You need to wait for Drupalconsole 0.12 for a D8.1 version.

I just run site:install and indeed 0.11 works still fine with D8.0

mixel’s picture

Status: Active » Closed (works as designed)

Just noticed Drupalconsole 1.0.0-alpha1 exist and should give support for D8.1

=> https://github.com/hechoendrupal/DrupalConsole/releases/tag/1.0.0-alpha1

So I guess this issue can be closed. Working on the incompatibility between Drupal and Symphony components looks like another issue.

alexrayu’s picture

This has been fixed in the latest version of Drupal console. Please do drupal self-update.

imrancluster’s picture

Thanks for all :), I'll will update my console today.

Strutsagget’s picture

I still got this in 0.11.2

blairski’s picture

Hi Strutsagget

Did you run composer install after drupal self-update?