From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../orm/src/Mapping/Builder/AssociationBuilder.php | 171 --------- .../src/Mapping/Builder/ClassMetadataBuilder.php | 426 --------------------- .../orm/src/Mapping/Builder/EmbeddedBuilder.php | 46 --- .../src/Mapping/Builder/EntityListenerBuilder.php | 55 --- .../orm/src/Mapping/Builder/FieldBuilder.php | 243 ------------ .../Builder/ManyToManyAssociationBuilder.php | 73 ---- .../Builder/OneToManyAssociationBuilder.php | 46 --- 7 files changed, 1060 deletions(-) delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/AssociationBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/ClassMetadataBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/EmbeddedBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/EntityListenerBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/FieldBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/ManyToManyAssociationBuilder.php delete mode 100644 vendor/doctrine/orm/src/Mapping/Builder/OneToManyAssociationBuilder.php (limited to 'vendor/doctrine/orm/src/Mapping/Builder') diff --git a/vendor/doctrine/orm/src/Mapping/Builder/AssociationBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/AssociationBuilder.php deleted file mode 100644 index ea9e13c..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/AssociationBuilder.php +++ /dev/null @@ -1,171 +0,0 @@ -mapping['mappedBy'] = $fieldName; - - return $this; - } - - /** @return $this */ - public function inversedBy(string $fieldName): static - { - $this->mapping['inversedBy'] = $fieldName; - - return $this; - } - - /** @return $this */ - public function cascadeAll(): static - { - $this->mapping['cascade'] = ['ALL']; - - return $this; - } - - /** @return $this */ - public function cascadePersist(): static - { - $this->mapping['cascade'][] = 'persist'; - - return $this; - } - - /** @return $this */ - public function cascadeRemove(): static - { - $this->mapping['cascade'][] = 'remove'; - - return $this; - } - - /** @return $this */ - public function cascadeDetach(): static - { - $this->mapping['cascade'][] = 'detach'; - - return $this; - } - - /** @return $this */ - public function cascadeRefresh(): static - { - $this->mapping['cascade'][] = 'refresh'; - - return $this; - } - - /** @return $this */ - public function fetchExtraLazy(): static - { - $this->mapping['fetch'] = ClassMetadata::FETCH_EXTRA_LAZY; - - return $this; - } - - /** @return $this */ - public function fetchEager(): static - { - $this->mapping['fetch'] = ClassMetadata::FETCH_EAGER; - - return $this; - } - - /** @return $this */ - public function fetchLazy(): static - { - $this->mapping['fetch'] = ClassMetadata::FETCH_LAZY; - - return $this; - } - - /** - * Add Join Columns. - * - * @return $this - */ - public function addJoinColumn( - string $columnName, - string $referencedColumnName, - bool $nullable = true, - bool $unique = false, - string|null $onDelete = null, - string|null $columnDef = null, - ): static { - $this->joinColumns[] = [ - 'name' => $columnName, - 'referencedColumnName' => $referencedColumnName, - 'nullable' => $nullable, - 'unique' => $unique, - 'onDelete' => $onDelete, - 'columnDefinition' => $columnDef, - ]; - - return $this; - } - - /** - * Sets field as primary key. - * - * @return $this - */ - public function makePrimaryKey(): static - { - $this->mapping['id'] = true; - - return $this; - } - - /** - * Removes orphan entities when detached from their parent. - * - * @return $this - */ - public function orphanRemoval(): static - { - $this->mapping['orphanRemoval'] = true; - - return $this; - } - - /** @throws InvalidArgumentException */ - public function build(): ClassMetadataBuilder - { - $mapping = $this->mapping; - if ($this->joinColumns) { - $mapping['joinColumns'] = $this->joinColumns; - } - - $cm = $this->builder->getClassMetadata(); - if ($this->type === ClassMetadata::MANY_TO_ONE) { - $cm->mapManyToOne($mapping); - } elseif ($this->type === ClassMetadata::ONE_TO_ONE) { - $cm->mapOneToOne($mapping); - } else { - throw new InvalidArgumentException('Type should be a ToOne Association here'); - } - - return $this->builder; - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/ClassMetadataBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/ClassMetadataBuilder.php deleted file mode 100644 index b9d3cc8..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/ClassMetadataBuilder.php +++ /dev/null @@ -1,426 +0,0 @@ -cm; - } - - /** - * Marks the class as mapped superclass. - * - * @return $this - */ - public function setMappedSuperClass(): static - { - $this->cm->isMappedSuperclass = true; - $this->cm->isEmbeddedClass = false; - - return $this; - } - - /** - * Marks the class as embeddable. - * - * @return $this - */ - public function setEmbeddable(): static - { - $this->cm->isEmbeddedClass = true; - $this->cm->isMappedSuperclass = false; - - return $this; - } - - /** - * Adds and embedded class - * - * @param class-string $class - * - * @return $this - */ - public function addEmbedded(string $fieldName, string $class, string|false|null $columnPrefix = null): static - { - $this->cm->mapEmbedded( - [ - 'fieldName' => $fieldName, - 'class' => $class, - 'columnPrefix' => $columnPrefix, - ], - ); - - return $this; - } - - /** - * Sets custom Repository class name. - * - * @return $this - */ - public function setCustomRepositoryClass(string $repositoryClassName): static - { - $this->cm->setCustomRepositoryClass($repositoryClassName); - - return $this; - } - - /** - * Marks class read only. - * - * @return $this - */ - public function setReadOnly(): static - { - $this->cm->markReadOnly(); - - return $this; - } - - /** - * Sets the table name. - * - * @return $this - */ - public function setTable(string $name): static - { - $this->cm->setPrimaryTable(['name' => $name]); - - return $this; - } - - /** - * Adds Index. - * - * @psalm-param list $columns - * - * @return $this - */ - public function addIndex(array $columns, string $name): static - { - if (! isset($this->cm->table['indexes'])) { - $this->cm->table['indexes'] = []; - } - - $this->cm->table['indexes'][$name] = ['columns' => $columns]; - - return $this; - } - - /** - * Adds Unique Constraint. - * - * @psalm-param list $columns - * - * @return $this - */ - public function addUniqueConstraint(array $columns, string $name): static - { - if (! isset($this->cm->table['uniqueConstraints'])) { - $this->cm->table['uniqueConstraints'] = []; - } - - $this->cm->table['uniqueConstraints'][$name] = ['columns' => $columns]; - - return $this; - } - - /** - * Sets class as root of a joined table inheritance hierarchy. - * - * @return $this - */ - public function setJoinedTableInheritance(): static - { - $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_JOINED); - - return $this; - } - - /** - * Sets class as root of a single table inheritance hierarchy. - * - * @return $this - */ - public function setSingleTableInheritance(): static - { - $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE); - - return $this; - } - - /** - * Sets the discriminator column details. - * - * @psalm-param class-string|null $enumType - * @psalm-param array $options - * - * @return $this - */ - public function setDiscriminatorColumn( - string $name, - string $type = 'string', - int $length = 255, - string|null $columnDefinition = null, - string|null $enumType = null, - array $options = [], - ): static { - $this->cm->setDiscriminatorColumn( - [ - 'name' => $name, - 'type' => $type, - 'length' => $length, - 'columnDefinition' => $columnDefinition, - 'enumType' => $enumType, - 'options' => $options, - ], - ); - - return $this; - } - - /** - * Adds a subclass to this inheritance hierarchy. - * - * @return $this - */ - public function addDiscriminatorMapClass(string $name, string $class): static - { - $this->cm->addDiscriminatorMapClass($name, $class); - - return $this; - } - - /** - * Sets deferred explicit change tracking policy. - * - * @return $this - */ - public function setChangeTrackingPolicyDeferredExplicit(): static - { - $this->cm->setChangeTrackingPolicy(ClassMetadata::CHANGETRACKING_DEFERRED_EXPLICIT); - - return $this; - } - - /** - * Adds lifecycle event. - * - * @return $this - */ - public function addLifecycleEvent(string $methodName, string $event): static - { - $this->cm->addLifecycleCallback($methodName, $event); - - return $this; - } - - /** - * Adds Field. - * - * @psalm-param array $mapping - * - * @return $this - */ - public function addField(string $name, string $type, array $mapping = []): static - { - $mapping['fieldName'] = $name; - $mapping['type'] = $type; - - $this->cm->mapField($mapping); - - return $this; - } - - /** - * Creates a field builder. - */ - public function createField(string $name, string $type): FieldBuilder - { - return new FieldBuilder( - $this, - [ - 'fieldName' => $name, - 'type' => $type, - ], - ); - } - - /** - * Creates an embedded builder. - */ - public function createEmbedded(string $fieldName, string $class): EmbeddedBuilder - { - return new EmbeddedBuilder( - $this, - [ - 'fieldName' => $fieldName, - 'class' => $class, - 'columnPrefix' => null, - ], - ); - } - - /** - * Adds a simple many to one association, optionally with the inversed by field. - */ - public function addManyToOne( - string $name, - string $targetEntity, - string|null $inversedBy = null, - ): ClassMetadataBuilder { - $builder = $this->createManyToOne($name, $targetEntity); - - if ($inversedBy !== null) { - $builder->inversedBy($inversedBy); - } - - return $builder->build(); - } - - /** - * Creates a ManyToOne Association Builder. - * - * Note: This method does not add the association, you have to call build() on the AssociationBuilder. - */ - public function createManyToOne(string $name, string $targetEntity): AssociationBuilder - { - return new AssociationBuilder( - $this, - [ - 'fieldName' => $name, - 'targetEntity' => $targetEntity, - ], - ClassMetadata::MANY_TO_ONE, - ); - } - - /** - * Creates a OneToOne Association Builder. - */ - public function createOneToOne(string $name, string $targetEntity): AssociationBuilder - { - return new AssociationBuilder( - $this, - [ - 'fieldName' => $name, - 'targetEntity' => $targetEntity, - ], - ClassMetadata::ONE_TO_ONE, - ); - } - - /** - * Adds simple inverse one-to-one association. - */ - public function addInverseOneToOne(string $name, string $targetEntity, string $mappedBy): ClassMetadataBuilder - { - $builder = $this->createOneToOne($name, $targetEntity); - $builder->mappedBy($mappedBy); - - return $builder->build(); - } - - /** - * Adds simple owning one-to-one association. - */ - public function addOwningOneToOne( - string $name, - string $targetEntity, - string|null $inversedBy = null, - ): ClassMetadataBuilder { - $builder = $this->createOneToOne($name, $targetEntity); - - if ($inversedBy !== null) { - $builder->inversedBy($inversedBy); - } - - return $builder->build(); - } - - /** - * Creates a ManyToMany Association Builder. - */ - public function createManyToMany(string $name, string $targetEntity): ManyToManyAssociationBuilder - { - return new ManyToManyAssociationBuilder( - $this, - [ - 'fieldName' => $name, - 'targetEntity' => $targetEntity, - ], - ClassMetadata::MANY_TO_MANY, - ); - } - - /** - * Adds a simple owning many to many association. - */ - public function addOwningManyToMany( - string $name, - string $targetEntity, - string|null $inversedBy = null, - ): ClassMetadataBuilder { - $builder = $this->createManyToMany($name, $targetEntity); - - if ($inversedBy !== null) { - $builder->inversedBy($inversedBy); - } - - return $builder->build(); - } - - /** - * Adds a simple inverse many to many association. - */ - public function addInverseManyToMany(string $name, string $targetEntity, string $mappedBy): ClassMetadataBuilder - { - $builder = $this->createManyToMany($name, $targetEntity); - $builder->mappedBy($mappedBy); - - return $builder->build(); - } - - /** - * Creates a one to many association builder. - */ - public function createOneToMany(string $name, string $targetEntity): OneToManyAssociationBuilder - { - return new OneToManyAssociationBuilder( - $this, - [ - 'fieldName' => $name, - 'targetEntity' => $targetEntity, - ], - ClassMetadata::ONE_TO_MANY, - ); - } - - /** - * Adds simple OneToMany association. - */ - public function addOneToMany(string $name, string $targetEntity, string $mappedBy): ClassMetadataBuilder - { - $builder = $this->createOneToMany($name, $targetEntity); - $builder->mappedBy($mappedBy); - - return $builder->build(); - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/EmbeddedBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/EmbeddedBuilder.php deleted file mode 100644 index b9d2127..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/EmbeddedBuilder.php +++ /dev/null @@ -1,46 +0,0 @@ -mapping['columnPrefix'] = $columnPrefix; - - return $this; - } - - /** - * Finalizes this embeddable and attach it to the ClassMetadata. - * - * Without this call an EmbeddedBuilder has no effect on the ClassMetadata. - */ - public function build(): ClassMetadataBuilder - { - $cm = $this->builder->getClassMetadata(); - - $cm->mapEmbedded($this->mapping); - - return $this->builder; - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/EntityListenerBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/EntityListenerBuilder.php deleted file mode 100644 index a0b14b9..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/EntityListenerBuilder.php +++ /dev/null @@ -1,55 +0,0 @@ - true, - Events::postRemove => true, - Events::prePersist => true, - Events::postPersist => true, - Events::preUpdate => true, - Events::postUpdate => true, - Events::postLoad => true, - Events::preFlush => true, - ]; - - /** - * Lookup the entity class to find methods that match to event lifecycle names - * - * @param ClassMetadata $metadata The entity metadata. - * @param string $className The listener class name. - * - * @throws MappingException When the listener class not found. - */ - public static function bindEntityListener(ClassMetadata $metadata, string $className): void - { - $class = $metadata->fullyQualifiedClassName($className); - - if (! class_exists($class)) { - throw MappingException::entityListenerClassNotFound($class, $className); - } - - foreach (get_class_methods($class) as $method) { - if (! isset(self::EVENTS[$method])) { - continue; - } - - $metadata->addEntityListener($method, $class, $method); - } - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/FieldBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/FieldBuilder.php deleted file mode 100644 index 8326ff5..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/FieldBuilder.php +++ /dev/null @@ -1,243 +0,0 @@ -mapping['length'] = $length; - - return $this; - } - - /** - * Sets nullable. - * - * @return $this - */ - public function nullable(bool $flag = true): static - { - $this->mapping['nullable'] = $flag; - - return $this; - } - - /** - * Sets Unique. - * - * @return $this - */ - public function unique(bool $flag = true): static - { - $this->mapping['unique'] = $flag; - - return $this; - } - - /** - * Sets column name. - * - * @return $this - */ - public function columnName(string $name): static - { - $this->mapping['columnName'] = $name; - - return $this; - } - - /** - * Sets Precision. - * - * @return $this - */ - public function precision(int $p): static - { - $this->mapping['precision'] = $p; - - return $this; - } - - /** - * Sets insertable. - * - * @return $this - */ - public function insertable(bool $flag = true): self - { - if (! $flag) { - $this->mapping['notInsertable'] = true; - } - - return $this; - } - - /** - * Sets updatable. - * - * @return $this - */ - public function updatable(bool $flag = true): self - { - if (! $flag) { - $this->mapping['notUpdatable'] = true; - } - - return $this; - } - - /** - * Sets scale. - * - * @return $this - */ - public function scale(int $s): static - { - $this->mapping['scale'] = $s; - - return $this; - } - - /** - * Sets field as primary key. - * - * @return $this - */ - public function makePrimaryKey(): static - { - $this->mapping['id'] = true; - - return $this; - } - - /** - * Sets an option. - * - * @return $this - */ - public function option(string $name, mixed $value): static - { - $this->mapping['options'][$name] = $value; - - return $this; - } - - /** @return $this */ - public function generatedValue(string $strategy = 'AUTO'): static - { - $this->generatedValue = $strategy; - - return $this; - } - - /** - * Sets field versioned. - * - * @return $this - */ - public function isVersionField(): static - { - $this->version = true; - - return $this; - } - - /** - * Sets Sequence Generator. - * - * @return $this - */ - public function setSequenceGenerator(string $sequenceName, int $allocationSize = 1, int $initialValue = 1): static - { - $this->sequenceDef = [ - 'sequenceName' => $sequenceName, - 'allocationSize' => $allocationSize, - 'initialValue' => $initialValue, - ]; - - return $this; - } - - /** - * Sets column definition. - * - * @return $this - */ - public function columnDefinition(string $def): static - { - $this->mapping['columnDefinition'] = $def; - - return $this; - } - - /** - * Set the FQCN of the custom ID generator. - * This class must extend \Doctrine\ORM\Id\AbstractIdGenerator. - * - * @return $this - */ - public function setCustomIdGenerator(string $customIdGenerator): static - { - $this->customIdGenerator = $customIdGenerator; - - return $this; - } - - /** - * Finalizes this field and attach it to the ClassMetadata. - * - * Without this call a FieldBuilder has no effect on the ClassMetadata. - */ - public function build(): ClassMetadataBuilder - { - $cm = $this->builder->getClassMetadata(); - if ($this->generatedValue) { - $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); - } - - if ($this->version) { - $cm->setVersionMapping($this->mapping); - } - - $cm->mapField($this->mapping); - if ($this->sequenceDef) { - $cm->setSequenceGeneratorDefinition($this->sequenceDef); - } - - if ($this->customIdGenerator) { - $cm->setCustomGeneratorDefinition(['class' => $this->customIdGenerator]); - } - - return $this->builder; - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/ManyToManyAssociationBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/ManyToManyAssociationBuilder.php deleted file mode 100644 index b83a8ba..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/ManyToManyAssociationBuilder.php +++ /dev/null @@ -1,73 +0,0 @@ -joinTableName = $name; - - return $this; - } - - /** - * Adds Inverse Join Columns. - * - * @return $this - */ - public function addInverseJoinColumn( - string $columnName, - string $referencedColumnName, - bool $nullable = true, - bool $unique = false, - string|null $onDelete = null, - string|null $columnDef = null, - ): static { - $this->inverseJoinColumns[] = [ - 'name' => $columnName, - 'referencedColumnName' => $referencedColumnName, - 'nullable' => $nullable, - 'unique' => $unique, - 'onDelete' => $onDelete, - 'columnDefinition' => $columnDef, - ]; - - return $this; - } - - public function build(): ClassMetadataBuilder - { - $mapping = $this->mapping; - $mapping['joinTable'] = []; - if ($this->joinColumns) { - $mapping['joinTable']['joinColumns'] = $this->joinColumns; - } - - if ($this->inverseJoinColumns) { - $mapping['joinTable']['inverseJoinColumns'] = $this->inverseJoinColumns; - } - - if ($this->joinTableName) { - $mapping['joinTable']['name'] = $this->joinTableName; - } - - $cm = $this->builder->getClassMetadata(); - $cm->mapManyToMany($mapping); - - return $this->builder; - } -} diff --git a/vendor/doctrine/orm/src/Mapping/Builder/OneToManyAssociationBuilder.php b/vendor/doctrine/orm/src/Mapping/Builder/OneToManyAssociationBuilder.php deleted file mode 100644 index 077c558..0000000 --- a/vendor/doctrine/orm/src/Mapping/Builder/OneToManyAssociationBuilder.php +++ /dev/null @@ -1,46 +0,0 @@ - $fieldNames - * - * @return $this - */ - public function setOrderBy(array $fieldNames): static - { - $this->mapping['orderBy'] = $fieldNames; - - return $this; - } - - /** @return $this */ - public function setIndexBy(string $fieldName): static - { - $this->mapping['indexBy'] = $fieldName; - - return $this; - } - - public function build(): ClassMetadataBuilder - { - $mapping = $this->mapping; - if ($this->joinColumns) { - $mapping['joinColumns'] = $this->joinColumns; - } - - $cm = $this->builder->getClassMetadata(); - $cm->mapOneToMany($mapping); - - return $this->builder; - } -} -- cgit v1.2.3