mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix task for symfony 5.4
This commit is contained in:
parent
680513a3a6
commit
38e5d9c7cc
@ -55,7 +55,6 @@ class DateIntervalType extends AbstractType
|
|||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('n', IntegerType::class, [
|
->add('n', IntegerType::class, [
|
||||||
'scale' => 0,
|
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new GreaterThan([
|
new GreaterThan([
|
||||||
'value' => 0,
|
'value' => 0,
|
||||||
|
@ -29,7 +29,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
#[ORM\Index(name: 'by_end_date', columns: ['end_date'])]
|
#[ORM\Index(name: 'by_end_date', columns: ['end_date'])]
|
||||||
class SingleTask extends AbstractTask
|
class SingleTask extends AbstractTask
|
||||||
{
|
{
|
||||||
#[Assert\Date]
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
#[ORM\Column(name: 'end_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
#[ORM\Column(name: 'end_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
||||||
private ?\DateTime $endDate = null;
|
private ?\DateTime $endDate = null;
|
||||||
@ -44,7 +43,6 @@ class SingleTask extends AbstractTask
|
|||||||
private ?RecurringTask $recurringTask = null;
|
private ?RecurringTask $recurringTask = null;
|
||||||
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
#[Assert\Date]
|
|
||||||
#[Assert\Expression('value === null or this.getEndDate() === null or value < this.getEndDate()', message: 'The start date must be before the end date')]
|
#[Assert\Expression('value === null or this.getEndDate() === null or value < this.getEndDate()', message: 'The start date must be before the end date')]
|
||||||
#[Assert\Expression('value === null or this.getWarningDate() === null or this.getWarningDate() > this.getStartDate()', message: 'The start date must be before warning date')]
|
#[Assert\Expression('value === null or this.getWarningDate() === null or this.getWarningDate() > this.getStartDate()', message: 'The start date must be before warning date')]
|
||||||
#[ORM\Column(name: 'start_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
#[ORM\Column(name: 'start_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user