diff --git a/lib/Doctrine/ORM/Mapping/ManyToMany.php b/lib/Doctrine/ORM/Mapping/ManyToMany.php index 349ab872f5e..99767eedae3 100644 --- a/lib/Doctrine/ORM/Mapping/ManyToMany.php +++ b/lib/Doctrine/ORM/Mapping/ManyToMany.php @@ -6,7 +6,6 @@ use Attribute; use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; -use Doctrine\Deprecations\Deprecation; /** * @Annotation @@ -43,11 +42,11 @@ final class ManyToMany implements Annotation public $indexBy; /** - * @param class-string|null $targetEntity - * @param string[]|null $cascade + * @param class-string $targetEntity + * @param string[]|null $cascade */ public function __construct( - ?string $targetEntity = null, + string $targetEntity, ?string $mappedBy = null, ?string $inversedBy = null, ?array $cascade = null, @@ -55,14 +54,6 @@ public function __construct( bool $orphanRemoval = false, ?string $indexBy = null ) { - if ($targetEntity === null) { - Deprecation::trigger( - 'doctrine/orm', - 'https://github.com/doctrine/orm/issues/8753', - 'Passing no target entity is deprecated.' - ); - } - $this->targetEntity = $targetEntity; $this->mappedBy = $mappedBy; $this->inversedBy = $inversedBy;