diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Mapping/Table.php')
-rw-r--r-- | vendor/doctrine/orm/src/Mapping/Table.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Mapping/Table.php b/vendor/doctrine/orm/src/Mapping/Table.php new file mode 100644 index 0000000..ac1e8ed --- /dev/null +++ b/vendor/doctrine/orm/src/Mapping/Table.php | |||
@@ -0,0 +1,45 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Mapping; | ||
6 | |||
7 | use Attribute; | ||
8 | use Doctrine\Deprecations\Deprecation; | ||
9 | |||
10 | #[Attribute(Attribute::TARGET_CLASS)] | ||
11 | final class Table implements MappingAttribute | ||
12 | { | ||
13 | /** | ||
14 | * @param array<Index>|null $indexes | ||
15 | * @param array<UniqueConstraint>|null $uniqueConstraints | ||
16 | * @param array<string,mixed> $options | ||
17 | */ | ||
18 | public function __construct( | ||
19 | public readonly string|null $name = null, | ||
20 | public readonly string|null $schema = null, | ||
21 | public readonly array|null $indexes = null, | ||
22 | public readonly array|null $uniqueConstraints = null, | ||
23 | public readonly array $options = [], | ||
24 | ) { | ||
25 | if ($this->indexes !== null) { | ||
26 | Deprecation::trigger( | ||
27 | 'doctrine/orm', | ||
28 | 'https://github.com/doctrine/orm/pull/11357', | ||
29 | 'Providing the property $indexes on %s does not have any effect and will be removed in Doctrine ORM 4.0. Please use the %s attribute instead.', | ||
30 | self::class, | ||
31 | Index::class, | ||
32 | ); | ||
33 | } | ||
34 | |||
35 | if ($this->uniqueConstraints !== null) { | ||
36 | Deprecation::trigger( | ||
37 | 'doctrine/orm', | ||
38 | 'https://github.com/doctrine/orm/pull/11357', | ||
39 | 'Providing the property $uniqueConstraints on %s does not have any effect and will be removed in Doctrine ORM 4.0. Please use the %s attribute instead.', | ||
40 | self::class, | ||
41 | UniqueConstraint::class, | ||
42 | ); | ||
43 | } | ||
44 | } | ||
45 | } | ||