Applied rector rules up to symfony 6.2

This commit is contained in:
Jan Böhmer 2023-05-28 01:21:05 +02:00
parent 88ea920dfb
commit a43af180a7
145 changed files with 563 additions and 889 deletions

View file

@ -57,9 +57,9 @@ class Project extends AbstractStructuralDBElement
/**
* @ORM\OneToMany(targetEntity="ProjectBOMEntry", mappedBy="project", cascade={"persist", "remove"}, orphanRemoval=true)
* @Assert\Valid()
* @Groups({"extended", "full"})
*/
#[Assert\Valid]
#[Groups(['extended', 'full'])]
protected Collection $bom_entries;
/**
@ -70,9 +70,9 @@ class Project extends AbstractStructuralDBElement
/**
* @var string|null The current status of the project
* @ORM\Column(type="string", length=64, nullable=true)
* @Assert\Choice({"draft","planning","in_production","finished","archived"})
* @Groups({"extended", "full"})
*/
#[Assert\Choice(['draft', 'planning', 'in_production', 'finished', 'archived'])]
#[Groups(['extended', 'full'])]
protected ?string $status = null;
@ -89,8 +89,8 @@ class Project extends AbstractStructuralDBElement
/**
* @ORM\Column(type="text", nullable=false)
* @Groups({"simple", "extended", "full"})
*/
#[Groups(['simple', 'extended', 'full'])]
protected string $description = '';
/**
@ -286,9 +286,7 @@ class Project extends AbstractStructuralDBElement
}
}
/**
* @Assert\Callback
*/
#[Assert\Callback]
public function validate(ExecutionContextInterface $context, $payload)
{
//If this project has subprojects, and these have builds part, they must be included in the BOM