Sylius: ContainerBuilder addResource method implement wrong interface in composer install (dev-master)

Created on 19 Jun 2017  ·  4Comments  ·  Source: Sylius/Sylius

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception


  [RuntimeException]                                                                                              
  An error occurred when executing the "'cache:clear --no-warmup'" command:                                       
  PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passe  
  d to Symfony\Component\DependencyInjection\ContainerBuilder::addResource() must implement interface Symfony\Co  
  mponent\Config\Resource\ResourceInterface, instance of Symfony\Component\Config\Resource\FileResource given, c  
  alled in /var/www/html/sylius-socle/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container  
  Builder.php on line 279 in /var/www/html/sylius-socle/vendor/symfony/symfony/src/Symfony/Component/DependencyI  
  njection/ContainerBuilder.php:219                                                                               
  Stack trace:                                                                                                    
  #0 /var/www/html/sylius-socle/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilde  
  r.php(279): Symfony\Component\DependencyInjection\ContainerBuilder->addResource(Object(Symfony\Component\Confi  
  g\Resource\FileResource))                                                                                       
  #1 /var/www/html/sylius-socle/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilde  
  r.php(258): Symfony\Component\DependencyInjection\ContainerBuilder->addClassResource(Obje in /var/www/html/syl  
  ius-socle/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 219     
  .

Most helpful comment

@pjedrzejewski @Mathieudewet
I already had this error while upgrading symfony (today again). The error was a cache problem. Try to empty manually the cache and try again the "cache:clear --no-warmup" command.

All 4 comments

@mathielen Could you tell us more how to reproduce this?

@pjedrzejewski @Mathieudewet
I already had this error while upgrading symfony (today again). The error was a cache problem. Try to empty manually the cache and try again the "cache:clear --no-warmup" command.

@Mathieudewet can you confirm that this solved your problem?

@lchrusciel Yes i confirm it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inssein picture inssein  ·  3Comments

crbelaus picture crbelaus  ·  3Comments

ping86 picture ping86  ·  3Comments

stefandoorn picture stefandoorn  ·  3Comments

eb22fbb4 picture eb22fbb4  ·  3Comments