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

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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