diff --git a/UPGRADE.md b/UPGRADE.md index 64a040ddeae..e6c6d737626 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -21,6 +21,12 @@ Using array access on instances of the following classes is no longer possible: - `Doctrine\ORM\Mapping\JoinColumnMapping` - `Doctrine\ORM\Mapping\JoinTableMapping` +## Remove properties `$indexes` and `$uniqueConstraints` from `Doctrine\ORM\Mapping\Table` + +The properties `$indexes` and `$uniqueConstraints` have been removed since they had no effect at all. +The preferred way of defining indices and unique constraints is by +using the `\Doctrine\ORM\Mapping\UniqueConstraint` and `\Doctrine\ORM\Mapping\Index` attributes. + # Upgrade to 3.2 ## `orm:schema-tool:update` option `--complete` is deprecated diff --git a/src/Mapping/Table.php b/src/Mapping/Table.php index 8a06deebc42..41103d3613c 100644 --- a/src/Mapping/Table.php +++ b/src/Mapping/Table.php @@ -9,16 +9,10 @@ #[Attribute(Attribute::TARGET_CLASS)] final class Table implements MappingAttribute { - /** - * @param array|null $indexes - * @param array|null $uniqueConstraints - * @param array $options - */ + /** @param array $options */ public function __construct( public readonly string|null $name = null, public readonly string|null $schema = null, - public readonly array|null $indexes = null, - public readonly array|null $uniqueConstraints = null, public readonly array $options = [], ) { }