Find the best Rector rule to solve your problem


CriteriaOrderingConstantsDeprecationRector

Replace ASC/DESC with enum Ordering in Criteria::orderBy method call, and remove usage of Criteria::ASC and Criteria::DESC constants elsewhere

 use Doctrine\Common\Collections\Criteria;

 $criteria = new Criteria();
-$criteria->orderBy(['someProperty' => 'ASC', 'anotherProperty' => 'DESC']);
+$criteria->orderBy(['someProperty' => \Doctrine\Common\Collections\Order::Ascending, 'anotherProperty' => \Doctrine\Common\Collections\Order::Descending]);