Hello,
Since this commit doctrine/collections@7f964ae the deprecation of Order enum encourage usage of native php 8.6 (not released at this time) SortDirection enum.
But methods that uses ordering are not updated regarding the usage of that enum:
ObjectRepository::findBy (https://github.com/doctrine/persistence/blob/4.2.x/src/ObjectRepository.php), argument $orderBy only accept strings 'asc'|'desc'|'ASC'|'DESC' and the SortDirection enum does not expose those values (e.g. with SortDirection::Ascending->name)
So phpstan triggers deprecations about a feature that is not released yet and other methods are not ready for that new feature.
I must ignore those errors in our Quality stack for the moment and replace usages of Order enum with string representations (it sounds like a little regression).
Regards.
(may be moving this issue to https://github.com/doctrine/persistence/issues instead ?)
Hello,
Since this commit doctrine/collections@7f964ae the deprecation of
Orderenum encourage usage of native php 8.6 (not released at this time)SortDirectionenum.But methods that uses ordering are not updated regarding the usage of that enum:
ObjectRepository::findBy(https://github.com/doctrine/persistence/blob/4.2.x/src/ObjectRepository.php), argument$orderByonly accept strings'asc'|'desc'|'ASC'|'DESC'and theSortDirectionenum does not expose those values (e.g. withSortDirection::Ascending->name)So phpstan triggers deprecations about a feature that is not released yet and other methods are not ready for that new feature.
I must ignore those errors in our Quality stack for the moment and replace usages of
Orderenum with string representations (it sounds like a little regression).Regards.
(may be moving this issue to https://github.com/doctrine/persistence/issues instead ?)