DQL validation for parse errors, unknown entity classes and unknown persistent fields. QueryBuilder validation is also supported. Recognizes magic findBy*, findOneBy* and countBy* methods on EntityRepository. Validates entity fields in repository findBy, findBy, findOneBy, findOneBy, count and countBy method calls. Interprets EntityRepository MyEntity correctly in phpDocs for further type inference of methods called on the repository. Provides correct return for Doctrine\ORM\EntityManager::getRepository(). Provides correct return type for Doctrine\ORM\EntityManager::find, getReference and getPartialReference when Foo::class entity class name is provided as the first argument. Queries are analyzed statically and do not require a running database server. This makes use of the Doctrine DQL parser and entities metadata.

Features

  • Query type inference
  • DQL validation for parse errors
  • Validates entity fields
  • To use this extension, require it in Composer
  • You can opt in for more advanced analysis by providing the object manager from your own application
  • This extension can infer the result type of DQL queries

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Doctrine extensions for PHPStan

Doctrine extensions for PHPStan Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Doctrine extensions for PHPStan!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Static Code Analysis Tool

Registered

2023-03-31