Fix static analysis after update to doctrine/orm 3.7

This commit is contained in:
Alejandro Celaya committed 2026-09-07 22:35:11 +02:00
1 parent 182a430b9e
commit cef79844f8
1 file changed
+2 -1
+2 -1
View File
@@ -8,6 +8,7 @@ use Cake\Chronos\Chronos;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\Order;
use Doctrine\Common\Collections\Selectable;
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
use Shlinkio\Shlink\Core\Domain\Entity\Domain;
@@ -186,7 +187,7 @@ class ShortUrl extends AbstractEntity
{
$criteria = Criteria::create()
->where(Criteria::expr()->eq('type', VisitType::IMPORTED))
->orderBy(['id' => 'DESC'])
->orderBy(['id' => Order::Descending])
->setMaxResults(1);
$visit = $this->visits->matching($criteria)->last();