-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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
Comments
Hi, can you show me your phpstan.neon?
On Wed, 13 Feb 2019 at 17:36, josefsabl ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAGZuNT2JBlRzPdmOHIdt0OBSlnZ-W8Pks5vND8TgaJpZM4a5zGl>
.
--
Ondřej Mirtes
|
I suspect you included only rules.neon but not extension.neon. Please follow the README how to use the extension. |
Correct, thank you! Silly me not RTFM, sorry :-/ But now I get: Internal error: Class Doctrine\ORM\EntityRepository does not exist Obviously, because I don use ORM at all. |
Can you show the stack trace as PHPStan recommmends?
What does it mean that you don’t use the ORM? Just ODM?
On Mon, 18 Feb 2019 at 12:14, josefsabl ***@***.***> wrote:
Correct, thank you! Silly me not RTFM, sorry :-/
But now I get:
Internal error: Class Doctrine\ORM\EntityRepository does not exist
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
Obviously, because I don use ORM at all.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGZuGPX0iIS0rCc1KhsfJGQ4mqgl2Ziks5vOosBgaJpZM4a5zGl>
.
--
Ondřej Mirtes
|
Well, I don't have Doctrine\ORM installed, simple as that :-) We use Doctrine\ODM since our database is MongoDB. And as the documentation states that this "Also supports Doctrine ODM." I thought I could use these rules to improve static analysis somehow and save some /** @var */ annotations. This is all I have in my composer regarding Doctrine
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hey, I just tried to enable these rules and get this crash:
I have these things in composer.json
and dev-master nette.
It should be noted that I don't use ORM but ODM.
The text was updated successfully, but these errors were encountered: