propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 398 forks source link

Generated Propel2 models kill phpstan analysis performance #1891

Open matweew opened 2 years ago

matweew commented 2 years ago

All the time when Propel classes are used in your code or just mentioned as phpdoc @return, the code generated by Propel2 slowdowns phpstan static analysis process very much.

Read the conversation on this issue https://github.com/phpstan/phpstan/issues/4581 for more details.

As I understood the problematic code is in $Model$Query classes and a lot of phpdocs @method inside.

A possible solution (not checked) is to generate native methods of the class instead of only @method annotations.

dereuromark commented 2 years ago

We could make a PR to test this and see if that solves the issue.