Skip to content

Crash: Service 'rules.56' (type of PHPStan\Rules\Doctrine\ORM\DqlRule): Service of type PHPStan\Type\Doctrine\ObjectMetadataResolver needed by $objectMetadat aResolver in __construct() not found #51

Closed
@josefsabl

Description

@josefsabl

Hey, I just tried to enable these rules and get this crash:

In Autowiring.php line 190:
                                                                               
  Service 'rules.56' (type of PHPStan\Rules\Doctrine\ORM\DqlRule): Service of  
   type PHPStan\Type\Doctrine\ObjectMetadataResolver needed by $objectMetadat  
  aResolver in __construct() not found. Did you register it in configuration   
  file?                                                                                                                                                    

analyse [--paths-file PATHS-FILE] [-c|--configuration CONFIGURATION] [-l|--level LEVEL] [--no-progress] [--debug] [-a|--autoload-file AUTOLOAD-FILE] [--error-format ERROR-FORMAT] [--memory-limit MEMORY-LIMIT] [--] [<paths>...]

I have these things in composer.json

"phpstan/phpstan": "0.11.2",
"phpstan/phpstan-doctrine": "0.11.1",
"phpstan/phpstan-mockery": "0.11.0",
"phpstan/phpstan-nette": "0.11.0",
"thecodingmachine/phpstan-safe-rule": "0.1.2"

and dev-master nette.

It should be noted that I don't use ORM but ODM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions