mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
This commit is contained in:
@@ -23,13 +23,11 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @RelationshipNoDuplicate
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['relationship' => Relationship::class])]
|
||||
#[ORM\Entity]
|
||||
#[DiscriminatorColumn(name: 'relation_id', type: 'integer')]
|
||||
#[ORM\Table(name: 'chill_person_relationships')]
|
||||
#[RelationshipNoDuplicate]
|
||||
class Relationship implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)]
|
||||
|
Reference in New Issue
Block a user