From 6bcf5d91ae4036ca9b6c1d61ed6a312e769990c1 Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Tue, 13 Oct 2026 09:53:14 +0200 Subject: [PATCH] Replace leftover @ORM annotations with attributes Co-Authored-By: Claude Sonnet 5.5 --- src/PropertyProcessor/DoctrineMappingProcessor.php | 2 +- test/Reflection/ReflectionClassTest.php | 2 -- test/Reflection/fixtures/abstract.php | 2 +- test/Reflection/fixtures/multiple_class.php | 2 +- test/Reflection/fixtures/static.php | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/PropertyProcessor/DoctrineMappingProcessor.php b/src/PropertyProcessor/DoctrineMappingProcessor.php index e478ab1..657be92 100644 --- a/src/PropertyProcessor/DoctrineMappingProcessor.php +++ b/src/PropertyProcessor/DoctrineMappingProcessor.php @@ -155,7 +155,7 @@ protected function processColumn(Column $column, PropertyInformation $informatio throw new InvalidColumnSettingsException( sprintf( 'Decimal type of "%s::%s" has scale and precision set to 0 or not set at all.' - . PHP_EOL . 'Usage: e.g. @ORM\Column(type="decimal", precision=2, scale=4).' + . PHP_EOL . 'Usage: e.g. #[ORM\Column(type: "decimal", precision: 2, scale: 4)].' . PHP_EOL . '"The precision represents the number of digits that are stored for values,' . PHP_EOL . ' and the scale represents the number of digits that can be stored' . PHP_EOL . ' following the decimal point".', diff --git a/test/Reflection/ReflectionClassTest.php b/test/Reflection/ReflectionClassTest.php index 1b3ca58..b1b4910 100644 --- a/test/Reflection/ReflectionClassTest.php +++ b/test/Reflection/ReflectionClassTest.php @@ -41,7 +41,6 @@ public function fileProvider(): array ' *' . PHP_EOL . ' * en dit dan?' . PHP_EOL . ' * @version bluh' . PHP_EOL . - ' * @ORM\Column(name="stam", length=100, type="string")' . PHP_EOL . ' */' . PHP_EOL . 'private $stam;', ], @@ -55,7 +54,6 @@ public function fileProvider(): array '/**' . PHP_EOL . ' * Waarom dit dan?' . PHP_EOL . ' * @version bluh' . PHP_EOL . - ' * @ORM\Column(name="stam", length=100, type="string")' . PHP_EOL . ' */' . PHP_EOL . 'private static $stam;', ], diff --git a/test/Reflection/fixtures/abstract.php b/test/Reflection/fixtures/abstract.php index 3be2bc6..45673cb 100644 --- a/test/Reflection/fixtures/abstract.php +++ b/test/Reflection/fixtures/abstract.php @@ -7,8 +7,8 @@ abstract class Boom { * * en dit dan? * @version bluh - * @ORM\Column(name="stam", length=100, type="string") */ + #[ORM\Column(name: 'stam', length: 100, type: 'string')] private $stam; use useless_trait; diff --git a/test/Reflection/fixtures/multiple_class.php b/test/Reflection/fixtures/multiple_class.php index 8f7b329..98fe350 100644 --- a/test/Reflection/fixtures/multiple_class.php +++ b/test/Reflection/fixtures/multiple_class.php @@ -7,8 +7,8 @@ abstract class Boom { * * en dit dan? * @version bluh - * @ORM\Column(name="stam", length=100, type="string") */ + #[ORM\Column(name: 'stam', length: 100, type: 'string')] private $stam; use useless_trait; diff --git a/test/Reflection/fixtures/static.php b/test/Reflection/fixtures/static.php index 08c203c..279620d 100644 --- a/test/Reflection/fixtures/static.php +++ b/test/Reflection/fixtures/static.php @@ -7,8 +7,8 @@ abstract class Boom { /** * Waarom dit dan? * @version bluh - * @ORM\Column(name="stam", length=100, type="string") */ + #[ORM\Column(name: 'stam', length: 100, type: 'string')] private static $stam; use useless_trait;