Jan Nedbal
Jan Nedbal
Related issues: - TypedExpression introduced: https://github.com/doctrine/orm/pull/7941 - Idea of enforcing TypedExpressions: https://github.com/doctrine/orm/issues/8024
I understand that, but since you are using `Type`s even in other contexts (like `TypedExpression`), it causes issues like described above.
> What improvement does this give? Minor CI & local speedup. > maybe phpcs should have some cpu core autodetection ;) Yeah, ideally. Current solution is really naive. ---- I...
> adding an explicit cast in StringType could actually break some existing cases I understand that. > given that the ORM currently does not allow registering custom boolean functions for...
I have a big list of features to implement in future, and "dead class analysis" is one of them. You just mentioned the easiest part of it, but the problem...
I just realized we cannot reliably tell that some interface is unused just by checking that it is never implemented / extended in another interface because it can contain used...
@ondrejmirtes The problem is that OtherMethodQueryBuilderParser [do not find the method in the file](https://github.com/phpstan/phpstan-doctrine/blob/c585610/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php#L80). Any idea how to address that?
Here is why: - [Declaring class](https://github.com/phpstan/phpstan-doctrine/blob/c585610/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php#L55) is the trait user (class), not the trait - Thus, it parses the file where the method is not present - But we cannot...
This extension [needs to know](https://github.com/phpstan/phpstan-doctrine/blob/815d5ae40ffe3a7788df1cd557e30e474f3aba1c/src/Type/Doctrine/QueryBuilder/EntityRepositoryCreateQueryBuilderDynamicReturnTypeExtension.php#L52) what is happening to the DQL AST inside those methods in order to support them properly. Looking at the [logic there](https://github.com/doctrine-extensions/DoctrineExtensions/blob/910c4ba96cc43153006cc46ba686a35b5231df69/src/Tree/Entity/Repository/NestedTreeRepository.php#L57), it might not be...
We have enforced usage of our `bin/phpstan` (instead of `vendor/bin/phpstan`), which can solve similar issues. Among other things, we ensure container is built ok before starting PHPStan: ```php exec('php '...