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
MicroStation by Bentley Systems is the trusted computer-aided design (CAD) software built specifically for infrastructure design. Icon
MicroStation by Bentley Systems is the trusted computer-aided design (CAD) software built specifically for infrastructure design.

Microstation enables architects, engineers, and designers to create precise 2D and 3D drawings that bring complex projects to life.

MicroStation is the only computer-aided design software for infrastructure design, helping architects and engineers like you bring their vision to life, present their designs to their clients, and deliver their projects to the community.
Learn More
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