You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the query builder, if the queried entity has alias "attribute", the type of the query result is considered mixed instead of list<Entity>. For example, with the following code:
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/App/Repository/AttributeRepository.php
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------
20 Method App\Repository\AttributeRepository::all() should return list<App\Entity\Attribute> but returns mixed.
💡 mixed is not a list.
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------
Changing the alias to any other value fixes the error.
The text was updated successfully, but these errors were encountered:
When using the query builder, if the queried entity has alias
"attribute"
, the type of the query result is consideredmixed
instead oflist<Entity>
. For example, with the following code:PHPStan will report:
Changing the alias to any other value fixes the error.
The text was updated successfully, but these errors were encountered: