mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix use of Ordering constant in doctrine orm association
See https://github.com/doctrine/orm/issues/11313 for a follow-up
This commit is contained in:
parent
e8c7623a1e
commit
19ffef156b
@ -48,3 +48,11 @@ parameters:
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Person.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
|
||||
|
@ -105,7 +105,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
||||
/**
|
||||
* @var Collection<CalendarDoc>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: CalendarDoc::class, mappedBy: 'calendar', orphanRemoval: true)]
|
||||
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: CalendarDoc::class, orphanRemoval: true)]
|
||||
private Collection $documents;
|
||||
|
||||
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
||||
@ -123,7 +123,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
||||
* @var Collection&Selectable<int, Invite>
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[ORM\OneToMany(targetEntity: Invite::class, mappedBy: 'calendar', orphanRemoval: true, cascade: ['persist', 'remove', 'merge', 'detach'])]
|
||||
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
|
||||
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_invites')]
|
||||
private Collection&Selectable $invites;
|
||||
|
||||
|
@ -493,7 +493,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
$this->scopeHistories[] = $newScope;
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]);
|
||||
$criteria->orderBy(['startDate' => 'ASC', 'id' => 'ASC']);
|
||||
|
||||
/** @var \Iterator $scopes */
|
||||
$scopes = $this->scopeHistories->matching($criteria)->getIterator();
|
||||
|
@ -157,7 +157,7 @@ class AccompanyingPeriod implements
|
||||
*/
|
||||
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])]
|
||||
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'accompanyingPeriod', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['createdAt' => Order::Descending, 'id' => 'DESC'])]
|
||||
#[ORM\OrderBy(['createdAt' => Criteria::DESC, 'id' => 'DESC'])]
|
||||
private Collection $comments;
|
||||
|
||||
#[Groups(['read', 'write', 'docgen:read'])]
|
||||
|
Loading…
x
Reference in New Issue
Block a user