-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch Attribute classes to support AnnotationDriver even with Doctrin…
…e ORM 3 for unit tests
- Loading branch information
1 parent
bf19933
commit 0999cba
Showing
20 changed files
with
294 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- src/Mapping/Column.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/Column.php 2024-02-08 14:19:31 | ||
@@ -7,6 +7,11 @@ | ||
use Attribute; | ||
use BackedEnum; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor | ||
+ * @Target({"PROPERTY","ANNOTATION"}) | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class Column implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/DiscriminatorColumn.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/DiscriminatorColumn.php 2024-02-08 14:25:37 | ||
@@ -6,7 +6,13 @@ | ||
|
||
use Attribute; | ||
use BackedEnum; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("CLASS") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class DiscriminatorColumn implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/DiscriminatorMap.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/DiscriminatorMap.php 2024-02-08 14:26:01 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("CLASS") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class DiscriminatorMap implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- src/Mapping/Embeddable.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/Embeddable.php 2024-02-08 14:23:25 | ||
@@ -6,6 +6,10 @@ | ||
|
||
use Attribute; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @Target("CLASS") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class Embeddable implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/Embedded.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/Embedded.php 2024-02-08 14:26:23 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class Embedded implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/Entity.php 2024-02-08 09:55:51 | ||
+++ src/Mapping/Entity.php 2024-02-08 09:55:54 | ||
@@ -7,7 +7,12 @@ | ||
use Attribute; | ||
use Doctrine\ORM\EntityRepository; | ||
|
||
-/** @template T of object */ | ||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("CLASS") | ||
+ * @template T of object | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class Entity implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/GeneratedValue.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/GeneratedValue.php 2024-02-08 14:20:21 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class GeneratedValue implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- src/Mapping/Id.php 2024-02-08 14:18:20 | ||
+++ src/Mapping/Id.php 2024-02-08 14:18:23 | ||
@@ -6,6 +6,10 @@ | ||
|
||
use Attribute; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class Id implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/InheritanceType.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/InheritanceType.php 2024-02-08 14:25:10 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("CLASS") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class InheritanceType implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/JoinColumn.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/JoinColumn.php 2024-02-08 14:22:27 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target({"PROPERTY","ANNOTATION"}) | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)] | ||
final class JoinColumn implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- src/Mapping/JoinColumns.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/JoinColumns.php 2024-02-08 14:26:44 | ||
@@ -4,6 +4,10 @@ | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
final class JoinColumns implements MappingAttribute | ||
{ | ||
/** @param array<JoinColumn> $value */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/ManyToMany.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/ManyToMany.php 2024-02-08 14:22:04 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class ManyToMany implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/ManyToOne.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/ManyToOne.php 2024-02-08 14:20:37 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class ManyToOne implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- src/Mapping/MappedSuperclass.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/MappedSuperclass.php 2024-02-08 14:23:56 | ||
@@ -5,8 +5,14 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
use Doctrine\ORM\EntityRepository; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("CLASS") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class MappedSuperclass implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/OneToMany.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/OneToMany.php 2024-02-08 14:21:43 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class OneToMany implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/OneToOne.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/OneToOne.php 2024-02-08 14:23:03 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class OneToOne implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/OrderBy.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/OrderBy.php 2024-02-08 18:01:12 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class OrderBy implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- src/Mapping/UniqueConstraint.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/UniqueConstraint.php 2024-02-08 14:24:37 | ||
@@ -5,7 +5,13 @@ | ||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Attribute; | ||
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @NamedArgumentConstructor() | ||
+ * @Target("ANNOTATION") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] | ||
final class UniqueConstraint implements MappingAttribute | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- src/Mapping/Version.php 2024-02-03 17:50:09 | ||
+++ src/Mapping/Version.php 2024-02-08 14:24:16 | ||
@@ -6,6 +6,10 @@ | ||
|
||
use Attribute; | ||
|
||
+/** | ||
+ * @Annotation | ||
+ * @Target("PROPERTY") | ||
+ */ | ||
#[Attribute(Attribute::TARGET_PROPERTY)] | ||
final class Version implements MappingAttribute | ||
{ |