Skip to content

Symfony DI DefinitionDecorator not found #49

Open
@cacahouwete

Description

@cacahouwete
Designation Value
php 7.3
symfony/framework 3.4
phpstan 0.11.8
phpstan-symfony 0.11.6
docker docker run --rm -v `pwd`:/project cacahouete/phpaudit:latest php -d memory_limit=50000M /usr/local/src/vendor/bin/phpstan.phar analyse src -l 1

I don't know why, but when I use phpstan-symfony with following config:

    symfony:
        container_xml_path: /project/var/cache/dev/srcDevDebugProjectContainer.xml
        console_application_loader: /project/tests/phpstan/console-application.php

I have the following error:

  Line   Xxxx/PaymentBundle/Command/SendTaxReceiptCommand.php                
 ------ ----------------------------------------------------------------------- 
         Internal error: Class                                                  
         'Symfony\Component\DependencyInjection\DefinitionDecorator' not found  
         Run PHPStan with --debug option and post the stack trace to:           
         https://github.com/phpstan/phpstan/issues/new 

(With option --debug)

Fatal error: Uncaught Error: Class 'Symfony\Component\DependencyInjection\DefinitionDecorator' not found in /project/vendor/hwi/oauth-bundle/DependencyInjection/Security/Factory/OAuthFactory.php:77
Stack trace:
#0 /project/vendor/hwi/oauth-bundle/DependencyInjection/Security/Factory/OAuthFactory.php(101): HWI\Bundle\OAuthBundle\DependencyInjection\Security\Factory\OAuthFactory->createResourceOwnerMap(Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder), 'main', Array)
#1 /project/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php(53): HWI\Bundle\OAuthBundle\DependencyInjection\Security\Factory\OAuthFactory->createAuthProvider(Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder), 'main', Array, '...')
#2 /project/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php(534): Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory->create(O in /project/vendor/hwi/oauth-bundle/DependencyInjection/Security/Factory/OAuthFactory.php on line 77

In class ChildDefinition I found class alias 👍

class_alias(ChildDefinition::class, DefinitionDecorator::class);

I don't understand why phpstan can't found this class :s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions