diff --git a/composer.json b/composer.json index f932ac94..e4a08086 100644 --- a/composer.json +++ b/composer.json @@ -19,25 +19,23 @@ "php": "^8.2", "doctrine/inflector": "^1.4 || ^2.0", "nikic/php-parser": "^4.0", - "symfony/property-info": "^5.3 || ^6.0", - "symfony/serializer": "^5.1 || ^6.0" + "symfony/property-info": "^5.4 || ^6.0", + "symfony/serializer": "^5.4 || ^6.0" }, "require-dev": { "doctrine/annotations": "~1.0", "moneyphp/money": "^3.0", "phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.0", "phpunit/phpunit": "^8.0", - "symfony/filesystem": "^5.3 || ^6.0", - "symfony/http-kernel": "^5.3 || ^6.0", - "symfony/uid": "^5.2 || ^6.0" + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/http-kernel": "^5.4 || ^6.0", + "symfony/uid": "^5.4 || ^6.0" }, "suggest": { "doctrine/annotations": "Docblock Annotations Parser", "phpdocumentor/reflection-docblock": "Allow to extract informations from PHP Doc blocks" }, "conflict": { - "symfony/serializer": "<4.2", - "symfony/property-info": "5.1.6 || 5.1.7", "nikic/php-parser": "<4.0.4" }, "autoload": { diff --git a/tests/Fixtures/Bar.php b/tests/Fixtures/Bar.php index 2f615c87..464b081d 100644 --- a/tests/Fixtures/Bar.php +++ b/tests/Fixtures/Bar.php @@ -10,9 +10,8 @@ class Bar { /** * @var int|null - * - * @Groups({"group2", "group3"}) */ + #[Groups(['group2', 'group3'])] private $id; public function getId(): ?int diff --git a/tests/Fixtures/Foo.php b/tests/Fixtures/Foo.php index cae192c0..3ad72e39 100644 --- a/tests/Fixtures/Foo.php +++ b/tests/Fixtures/Foo.php @@ -10,9 +10,8 @@ class Foo { /** * @var int - * - * @Groups({"group1", "group2", "group3"}) */ + #[Groups(['group1', 'group2', 'group3'])] private $id = 0; public function getId(): int diff --git a/tests/Fixtures/FooIgnore.php b/tests/Fixtures/FooIgnore.php index ebd7bb53..b3e94d30 100644 --- a/tests/Fixtures/FooIgnore.php +++ b/tests/Fixtures/FooIgnore.php @@ -10,9 +10,8 @@ class FooIgnore { /** * @var int - * - * @Ignore */ + #[Ignore] public $id; public function getId(): int diff --git a/tests/Fixtures/FooMaxDepth.php b/tests/Fixtures/FooMaxDepth.php index e56769e1..5a37fa97 100644 --- a/tests/Fixtures/FooMaxDepth.php +++ b/tests/Fixtures/FooMaxDepth.php @@ -15,9 +15,8 @@ class FooMaxDepth /** * @var FooMaxDepth|null - * - * @MaxDepth(2) */ + #[MaxDepth(2)] private $child; public function __construct(int $id, ?self $child = null) diff --git a/tests/Fixtures/Pet.php b/tests/Fixtures/Pet.php index f1b5aa55..50347c08 100644 --- a/tests/Fixtures/Pet.php +++ b/tests/Fixtures/Pet.php @@ -6,13 +6,11 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap; -/** - * @DiscriminatorMap(typeProperty="type", mapping={ - * "cat"="AutoMapper\Tests\Fixtures\Cat", - * "dog"="AutoMapper\Tests\Fixtures\Dog", - * "fish"="AutoMapper\Tests\Fixtures\Fish" - * }) - */ +#[DiscriminatorMap(typeProperty: 'type', mapping: [ + 'cat' => Cat::class, + 'dog' => Dog::class, + 'fish' => Fish::class, +])] abstract class Pet { /** @var string */ diff --git a/tests/Fixtures/Transformer/ArrayToMoneyTransformer.php b/tests/Fixtures/Transformer/ArrayToMoneyTransformer.php index 54928f54..65432063 100644 --- a/tests/Fixtures/Transformer/ArrayToMoneyTransformer.php +++ b/tests/Fixtures/Transformer/ArrayToMoneyTransformer.php @@ -21,9 +21,6 @@ */ final class ArrayToMoneyTransformer implements TransformerInterface { - /** - * {@inheritdoc} - */ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMapping, UniqueVariableScope $uniqueVariableScope): array { return [new Expr\New_(new Name\FullyQualified(Money::class), [ @@ -34,17 +31,11 @@ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMa ]), []]; } - /** - * {@inheritdoc} - */ public function getDependencies(): array { return []; } - /** - * {@inheritdoc} - */ public function assignByRef(): bool { return false; diff --git a/tests/Fixtures/Transformer/MoneyToArrayTransformer.php b/tests/Fixtures/Transformer/MoneyToArrayTransformer.php index 11a08d67..a3f42c2b 100644 --- a/tests/Fixtures/Transformer/MoneyToArrayTransformer.php +++ b/tests/Fixtures/Transformer/MoneyToArrayTransformer.php @@ -18,9 +18,6 @@ */ final class MoneyToArrayTransformer implements TransformerInterface { - /** - * {@inheritdoc} - */ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMapping, UniqueVariableScope $uniqueVariableScope): array { $moneyVar = new Expr\Variable($uniqueVariableScope->getUniqueName('money')); @@ -31,17 +28,11 @@ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMa ]]; } - /** - * {@inheritdoc} - */ public function getDependencies(): array { return []; } - /** - * {@inheritdoc} - */ public function assignByRef(): bool { return false; diff --git a/tests/Fixtures/Transformer/MoneyToMoneyTransformer.php b/tests/Fixtures/Transformer/MoneyToMoneyTransformer.php index 29eadc22..1a3bb747 100644 --- a/tests/Fixtures/Transformer/MoneyToMoneyTransformer.php +++ b/tests/Fixtures/Transformer/MoneyToMoneyTransformer.php @@ -20,9 +20,6 @@ */ final class MoneyToMoneyTransformer implements TransformerInterface { - /** - * {@inheritdoc} - */ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMapping, UniqueVariableScope $uniqueVariableScope): array { return [ @@ -36,17 +33,11 @@ public function transform(Expr $input, Expr $target, PropertyMapping $propertyMa ]; } - /** - * {@inheritdoc} - */ public function getDependencies(): array { return []; } - /** - * {@inheritdoc} - */ public function assignByRef(): bool { return false; diff --git a/tests/Fixtures/Transformer/MoneyTransformerFactory.php b/tests/Fixtures/Transformer/MoneyTransformerFactory.php index 77ad41f4..dfad38f4 100644 --- a/tests/Fixtures/Transformer/MoneyTransformerFactory.php +++ b/tests/Fixtures/Transformer/MoneyTransformerFactory.php @@ -15,9 +15,6 @@ */ final class MoneyTransformerFactory extends AbstractUniqueTypeTransformerFactory { - /** - * {@inheritdoc} - */ protected function createTransformer(Type $sourceType, Type $targetType, MapperMetadataInterface $mapperMetadata): ?TransformerInterface { $isSourceMoney = $this->isMoneyType($sourceType); diff --git a/tests/Fixtures/UserWithYearOfBirth.php b/tests/Fixtures/UserWithYearOfBirth.php index 90f171e6..46b90546 100644 --- a/tests/Fixtures/UserWithYearOfBirth.php +++ b/tests/Fixtures/UserWithYearOfBirth.php @@ -9,24 +9,21 @@ class UserWithYearOfBirth { /** - * @Groups({"read"}) - * * @var int */ + #[Groups('read')] private $id; /** - * @Groups({"read"}) - * * @var string */ + #[Groups('read')] public $name; /** - * @Groups({"read"}) - * * @var string|int */ + #[Groups('read')] public $age; public function __construct($id, $name, $age) @@ -36,9 +33,7 @@ public function __construct($id, $name, $age) $this->age = $age; } - /** - * @Groups({"read"}) - */ + #[Groups('read')] public function getYearOfBirth() { return ((int) date('Y')) - ((int) $this->age);