diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index da1cfcf111..74fae606cf 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -52,11 +52,18 @@ 'no_homoglyph_names' => true, 'no_null_property_initialization' => true, 'no_superfluous_elseif' => true, + 'no_superfluous_phpdoc_tags' => false, 'no_unset_on_property' => true, 'no_useless_else' => true, 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true], 'ordered_class_elements' => true, 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'phpdoc_order' => ['order' => ['param', 'throws', 'return']], + 'phpdoc_separation' => ['groups' => [ + ['Gedmo\\*'], + ['ODM\\*'], + ['ORM\\*'], + ]], 'phpdoc_summary' => false, 'phpdoc_to_comment' => false, 'php_unit_construct' => true, diff --git a/composer.json b/composer.json index 9efd351d13..d49e283c20 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "doctrine/doctrine-bundle": "^2.3", "doctrine/mongodb-odm": "^2.3", "doctrine/orm": "^2.14.0", - "friendsofphp/php-cs-fixer": "^3.4.0 <3.10", + "friendsofphp/php-cs-fixer": "^3.14.0", "nesbot/carbon": "^2.55", "phpstan/phpstan": "^1.10.2", "phpstan/phpstan-doctrine": "^1.0", diff --git a/example/app/Entity/Category.php b/example/app/Entity/Category.php index 31fcc3d1d3..47ea051479 100644 --- a/example/app/Entity/Category.php +++ b/example/app/Entity/Category.php @@ -17,8 +17,10 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Table(name="ext_categories") * @ORM\Entity(repositoryClass="App\Entity\Repository\CategoryRepository") + * * @Gedmo\TranslationEntity(class="App\Entity\CategoryTranslation") */ class Category @@ -34,6 +36,7 @@ class Category * @var string|null * * @Gedmo\Translatable + * * @ORM\Column(length=64) */ private $title; @@ -42,6 +45,7 @@ class Category * @var string|null * * @Gedmo\Translatable + * * @ORM\Column(type="text", nullable=true) */ private $description; @@ -51,24 +55,28 @@ class Category * * @Gedmo\Translatable * @Gedmo\Slug(fields={"created", "title"}) + * * @ORM\Column(length=64, unique=true) */ private $slug; /** * @Gedmo\TreeLeft + * * @ORM\Column(type="integer") */ private $lft; /** * @Gedmo\TreeRight + * * @ORM\Column(type="integer") */ private $rgt; /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -76,12 +84,14 @@ class Category /** * @Gedmo\TreeRoot + * * @ORM\Column(type="integer", nullable=true) */ private $root; /** * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ private $level; @@ -93,24 +103,28 @@ class Category /** * @Gedmo\Timestampable(on="create") + * * @ORM\Column(type="datetime") */ private $created; /** * @Gedmo\Timestampable(on="update") + * * @ORM\Column(type="datetime") */ private $updated; /** * @Gedmo\Blameable(on="create") + * * @ORM\Column(type="string") */ private $createdBy; /** * @Gedmo\Blameable(on="update") + * * @ORM\Column(type="string") */ private $updatedBy; diff --git a/src/AbstractTrackingListener.php b/src/AbstractTrackingListener.php index 5fda583d9c..0cd7e51ac5 100644 --- a/src/AbstractTrackingListener.php +++ b/src/AbstractTrackingListener.php @@ -47,6 +47,7 @@ public function getSubscribedEvents() * Maps additional metadata for the object. * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void diff --git a/src/Blameable/Mapping/Driver/Annotation.php b/src/Blameable/Mapping/Driver/Annotation.php index 20817fb95f..6bde2d0d41 100644 --- a/src/Blameable/Mapping/Driver/Annotation.php +++ b/src/Blameable/Mapping/Driver/Annotation.php @@ -46,9 +46,9 @@ public function readExtendedMetadata($meta, array &$config) $class = $this->getMetaReflectionClass($meta); // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Blameable/Traits/BlameableDocument.php b/src/Blameable/Traits/BlameableDocument.php index 7b5878b21b..a35e13cd0c 100644 --- a/src/Blameable/Traits/BlameableDocument.php +++ b/src/Blameable/Traits/BlameableDocument.php @@ -22,7 +22,9 @@ trait BlameableDocument { /** * @var string + * * @Gedmo\Blameable(on="create") + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -31,7 +33,9 @@ trait BlameableDocument /** * @var string + * * @Gedmo\Blameable(on="update") + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] diff --git a/src/Blameable/Traits/BlameableEntity.php b/src/Blameable/Traits/BlameableEntity.php index 55c91932e6..34bb08b9dc 100644 --- a/src/Blameable/Traits/BlameableEntity.php +++ b/src/Blameable/Traits/BlameableEntity.php @@ -21,7 +21,9 @@ trait BlameableEntity { /** * @var string + * * @Gedmo\Blameable(on="create") + * * @ORM\Column(nullable=true) */ #[ORM\Column(nullable: true)] @@ -30,7 +32,9 @@ trait BlameableEntity /** * @var string + * * @Gedmo\Blameable(on="update") + * * @ORM\Column(nullable=true) */ #[ORM\Column(nullable: true)] diff --git a/src/IpTraceable/Mapping/Driver/Annotation.php b/src/IpTraceable/Mapping/Driver/Annotation.php index 3a892f8e00..3c7cfb0010 100644 --- a/src/IpTraceable/Mapping/Driver/Annotation.php +++ b/src/IpTraceable/Mapping/Driver/Annotation.php @@ -44,9 +44,9 @@ public function readExtendedMetadata($meta, array &$config) $class = $this->getMetaReflectionClass($meta); // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/IpTraceable/Traits/IpTraceableDocument.php b/src/IpTraceable/Traits/IpTraceableDocument.php index 21fbdb8d4d..0c98dec2ac 100644 --- a/src/IpTraceable/Traits/IpTraceableDocument.php +++ b/src/IpTraceable/Traits/IpTraceableDocument.php @@ -22,7 +22,9 @@ trait IpTraceableDocument { /** * @var string + * * @Gedmo\IpTraceable(on="create") + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -31,7 +33,9 @@ trait IpTraceableDocument /** * @var string + * * @Gedmo\IpTraceable(on="update") + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] diff --git a/src/IpTraceable/Traits/IpTraceableEntity.php b/src/IpTraceable/Traits/IpTraceableEntity.php index 4a371a149e..d0768f72d9 100644 --- a/src/IpTraceable/Traits/IpTraceableEntity.php +++ b/src/IpTraceable/Traits/IpTraceableEntity.php @@ -21,7 +21,9 @@ trait IpTraceableEntity { /** * @var string + * * @Gedmo\IpTraceable(on="create") + * * @ORM\Column(length=45, nullable=true) */ #[ORM\Column(length: 45, nullable: true)] @@ -30,7 +32,9 @@ trait IpTraceableEntity /** * @var string + * * @Gedmo\IpTraceable(on="update") + * * @ORM\Column(length=45, nullable=true) */ #[ORM\Column(length: 45, nullable: true)] diff --git a/src/Loggable/Document/LogEntry.php b/src/Loggable/Document/LogEntry.php index 433366f80d..f4dce120ba 100644 --- a/src/Loggable/Document/LogEntry.php +++ b/src/Loggable/Document/LogEntry.php @@ -18,6 +18,7 @@ * Gedmo\Loggable\Document\LogEntry * * @MongoODM\Document(repositoryClass="Gedmo\Loggable\Document\Repository\LogEntryRepository") + * * @MongoODM\Index(keys={"objectId": "asc", "objectClass": "asc", "version": "asc"}) * @MongoODM\Index(keys={"loggedAt": "asc"}) * @MongoODM\Index(keys={"objectClass": "asc"}) diff --git a/src/Loggable/LoggableListener.php b/src/Loggable/LoggableListener.php index 8ebbb7183a..eb515690db 100644 --- a/src/Loggable/LoggableListener.php +++ b/src/Loggable/LoggableListener.php @@ -126,6 +126,7 @@ public function getSubscribedEvents() * Maps additional metadata * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void @@ -209,9 +210,11 @@ public function onFlush(EventArgs $eventArgs) * Get the LogEntry class * * @param string $class + * * @phpstan-param class-string $class * * @return string + * * @phpstan-return class-string> */ protected function getLogEntryClass(LoggableAdapter $ea, $class) diff --git a/src/Loggable/Mapping/Event/LoggableAdapter.php b/src/Loggable/Mapping/Event/LoggableAdapter.php index bdee62b5b2..ac5b3f27eb 100644 --- a/src/Loggable/Mapping/Event/LoggableAdapter.php +++ b/src/Loggable/Mapping/Event/LoggableAdapter.php @@ -23,6 +23,7 @@ interface LoggableAdapter extends AdapterInterface * Get the default object class name used to store the log entries. * * @return string + * * @phpstan-return class-string */ public function getDefaultLogEntryClass(); diff --git a/src/Mapping/Annotation/Blameable.php b/src/Mapping/Annotation/Blameable.php index 64e1aac901..807320e039 100644 --- a/src/Mapping/Annotation/Blameable.php +++ b/src/Mapping/Annotation/Blameable.php @@ -16,7 +16,9 @@ * Blameable annotation for Blameable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author David Buchmann diff --git a/src/Mapping/Annotation/IpTraceable.php b/src/Mapping/Annotation/IpTraceable.php index c9ee21c430..50b86bee5d 100644 --- a/src/Mapping/Annotation/IpTraceable.php +++ b/src/Mapping/Annotation/IpTraceable.php @@ -16,7 +16,9 @@ * IpTraceable annotation for IpTraceable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Pierre-Charles Bertineau diff --git a/src/Mapping/Annotation/Language.php b/src/Mapping/Annotation/Language.php index cd18ec4f56..019f3d7543 100644 --- a/src/Mapping/Annotation/Language.php +++ b/src/Mapping/Annotation/Language.php @@ -16,6 +16,7 @@ * Language annotation for Translatable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Locale.php b/src/Mapping/Annotation/Locale.php index 7e666f51d7..7a18317eca 100644 --- a/src/Mapping/Annotation/Locale.php +++ b/src/Mapping/Annotation/Locale.php @@ -16,6 +16,7 @@ * Locale annotation for Translatable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Loggable.php b/src/Mapping/Annotation/Loggable.php index ce29fba47c..f47f22cbca 100644 --- a/src/Mapping/Annotation/Loggable.php +++ b/src/Mapping/Annotation/Loggable.php @@ -19,7 +19,9 @@ * @phpstan-template T of LogEntryInterface * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Reference.php b/src/Mapping/Annotation/Reference.php index 01d56f8c33..f2f5d55a9e 100644 --- a/src/Mapping/Annotation/Reference.php +++ b/src/Mapping/Annotation/Reference.php @@ -17,6 +17,7 @@ * to be user like "@ReferenceMany(type="entity", class="MyEntity", identifier="entity_id")" * * @author Bulat Shakirzyanov + * * @Annotation */ abstract class Reference implements GedmoAnnotation @@ -25,12 +26,14 @@ abstract class Reference implements GedmoAnnotation /** * @var string|null + * * @phpstan-var 'entity'|'document'|null */ public $type; /** * @var string|null + * * @phpstan-var class-string|null */ public $class; diff --git a/src/Mapping/Annotation/ReferenceIntegrity.php b/src/Mapping/Annotation/ReferenceIntegrity.php index c19e6b9df8..3113dc03a7 100644 --- a/src/Mapping/Annotation/ReferenceIntegrity.php +++ b/src/Mapping/Annotation/ReferenceIntegrity.php @@ -16,7 +16,9 @@ * ReferenceIntegrity annotation for ReferenceIntegrity behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Evert Harmeling diff --git a/src/Mapping/Annotation/ReferenceMany.php b/src/Mapping/Annotation/ReferenceMany.php index 4a0bb86d38..55dd82eecf 100644 --- a/src/Mapping/Annotation/ReferenceMany.php +++ b/src/Mapping/Annotation/ReferenceMany.php @@ -14,7 +14,9 @@ * to be user like "@ReferenceMany(type="entity", class="MyEntity", identifier="entity_id")" * * @author Bulat Shakirzyanov + * * @NamedArgumentConstructor + * * @Annotation * * @final since gedmo/doctrine-extensions 3.11 diff --git a/src/Mapping/Annotation/ReferenceManyEmbed.php b/src/Mapping/Annotation/ReferenceManyEmbed.php index cbd297d182..211a7611be 100644 --- a/src/Mapping/Annotation/ReferenceManyEmbed.php +++ b/src/Mapping/Annotation/ReferenceManyEmbed.php @@ -11,6 +11,7 @@ /** * @NamedArgumentConstructor + * * @Annotation * * @final since gedmo/doctrine-extensions 3.11 diff --git a/src/Mapping/Annotation/Slug.php b/src/Mapping/Annotation/Slug.php index 9625a4195b..86d084c896 100644 --- a/src/Mapping/Annotation/Slug.php +++ b/src/Mapping/Annotation/Slug.php @@ -16,7 +16,9 @@ * Slug annotation for Sluggable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/SlugHandler.php b/src/Mapping/Annotation/SlugHandler.php index 556575dfca..2db60e083f 100644 --- a/src/Mapping/Annotation/SlugHandler.php +++ b/src/Mapping/Annotation/SlugHandler.php @@ -17,6 +17,7 @@ * SlugHandler annotation for Sluggable behavioral extension * * @Annotation + * * @NamedArgumentConstructor * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/SlugHandlerOption.php b/src/Mapping/Annotation/SlugHandlerOption.php index c34947e1ff..8ab3df0859 100644 --- a/src/Mapping/Annotation/SlugHandlerOption.php +++ b/src/Mapping/Annotation/SlugHandlerOption.php @@ -16,6 +16,7 @@ * SlugHandlerOption annotation for Sluggable behavioral extension * * @Annotation + * * @NamedArgumentConstructor * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/SoftDeleteable.php b/src/Mapping/Annotation/SoftDeleteable.php index 20fb3812ba..d66b378f1e 100644 --- a/src/Mapping/Annotation/SoftDeleteable.php +++ b/src/Mapping/Annotation/SoftDeleteable.php @@ -18,7 +18,9 @@ * @author Gustavo Falco * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") */ #[\Attribute(\Attribute::TARGET_CLASS)] diff --git a/src/Mapping/Annotation/SortableGroup.php b/src/Mapping/Annotation/SortableGroup.php index 94ca692a7c..bb96846f0b 100644 --- a/src/Mapping/Annotation/SortableGroup.php +++ b/src/Mapping/Annotation/SortableGroup.php @@ -18,6 +18,7 @@ * @author Lukas Botsch * * @Annotation + * * @Target("PROPERTY") */ #[\Attribute(\Attribute::TARGET_PROPERTY)] diff --git a/src/Mapping/Annotation/SortablePosition.php b/src/Mapping/Annotation/SortablePosition.php index 42f62fc8ed..44ca9ec41a 100644 --- a/src/Mapping/Annotation/SortablePosition.php +++ b/src/Mapping/Annotation/SortablePosition.php @@ -18,6 +18,7 @@ * @author Lukas Botsch * * @Annotation + * * @Target("PROPERTY") */ #[\Attribute(\Attribute::TARGET_PROPERTY)] diff --git a/src/Mapping/Annotation/Timestampable.php b/src/Mapping/Annotation/Timestampable.php index 0ade3ca48a..2238cdfab2 100644 --- a/src/Mapping/Annotation/Timestampable.php +++ b/src/Mapping/Annotation/Timestampable.php @@ -16,7 +16,9 @@ * Timestampable annotation for Timestampable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Translatable.php b/src/Mapping/Annotation/Translatable.php index 2379b40340..41864f4b53 100644 --- a/src/Mapping/Annotation/Translatable.php +++ b/src/Mapping/Annotation/Translatable.php @@ -16,7 +16,9 @@ * Translatable annotation for Translatable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TranslationEntity.php b/src/Mapping/Annotation/TranslationEntity.php index 596cb584f2..57341f5dc3 100644 --- a/src/Mapping/Annotation/TranslationEntity.php +++ b/src/Mapping/Annotation/TranslationEntity.php @@ -16,7 +16,9 @@ * TranslationEntity annotation for Translatable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Tree.php b/src/Mapping/Annotation/Tree.php index d7fbba35f0..a2afe7e1f3 100644 --- a/src/Mapping/Annotation/Tree.php +++ b/src/Mapping/Annotation/Tree.php @@ -16,7 +16,9 @@ * Tree annotation for Tree behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreeClosure.php b/src/Mapping/Annotation/TreeClosure.php index eacafbe244..ca14bf6aa2 100644 --- a/src/Mapping/Annotation/TreeClosure.php +++ b/src/Mapping/Annotation/TreeClosure.php @@ -17,7 +17,9 @@ * TreeClosure annotation for Tree behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreeLeft.php b/src/Mapping/Annotation/TreeLeft.php index 2d7eebf7f6..ac3d0ede57 100644 --- a/src/Mapping/Annotation/TreeLeft.php +++ b/src/Mapping/Annotation/TreeLeft.php @@ -16,6 +16,7 @@ * TreeLeft annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreeLevel.php b/src/Mapping/Annotation/TreeLevel.php index f557db4ce9..e903b8cecd 100644 --- a/src/Mapping/Annotation/TreeLevel.php +++ b/src/Mapping/Annotation/TreeLevel.php @@ -16,7 +16,9 @@ * TreeLevel annotation for Tree behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreeLockTime.php b/src/Mapping/Annotation/TreeLockTime.php index 3153219760..13e56d93ba 100644 --- a/src/Mapping/Annotation/TreeLockTime.php +++ b/src/Mapping/Annotation/TreeLockTime.php @@ -16,6 +16,7 @@ * TreeLockTime annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/TreeParent.php b/src/Mapping/Annotation/TreeParent.php index 70a1281600..9a84bc8e57 100644 --- a/src/Mapping/Annotation/TreeParent.php +++ b/src/Mapping/Annotation/TreeParent.php @@ -16,6 +16,7 @@ * TreeParent annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreePath.php b/src/Mapping/Annotation/TreePath.php index 07608c9370..9f9d0d0237 100644 --- a/src/Mapping/Annotation/TreePath.php +++ b/src/Mapping/Annotation/TreePath.php @@ -16,7 +16,9 @@ * TreePath annotation for Tree behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/TreePathHash.php b/src/Mapping/Annotation/TreePathHash.php index 64a91d1e1d..9a1545d843 100644 --- a/src/Mapping/Annotation/TreePathHash.php +++ b/src/Mapping/Annotation/TreePathHash.php @@ -16,6 +16,7 @@ * TreePath annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author diff --git a/src/Mapping/Annotation/TreePathSource.php b/src/Mapping/Annotation/TreePathSource.php index 683efab64a..5fa6ce5656 100644 --- a/src/Mapping/Annotation/TreePathSource.php +++ b/src/Mapping/Annotation/TreePathSource.php @@ -16,6 +16,7 @@ * TreePath annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/TreeRight.php b/src/Mapping/Annotation/TreeRight.php index 79d906d52d..727cf508f1 100644 --- a/src/Mapping/Annotation/TreeRight.php +++ b/src/Mapping/Annotation/TreeRight.php @@ -16,6 +16,7 @@ * TreeRight annotation for Tree behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/TreeRoot.php b/src/Mapping/Annotation/TreeRoot.php index 0065995fdc..57302eb314 100644 --- a/src/Mapping/Annotation/TreeRoot.php +++ b/src/Mapping/Annotation/TreeRoot.php @@ -16,7 +16,9 @@ * TreeRoot annotation for Tree behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Annotation/Uploadable.php b/src/Mapping/Annotation/Uploadable.php index 2bb8ce2cf7..88070c0fc1 100644 --- a/src/Mapping/Annotation/Uploadable.php +++ b/src/Mapping/Annotation/Uploadable.php @@ -18,7 +18,9 @@ * Uploadable annotation for Uploadable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("CLASS") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/UploadableFileMimeType.php b/src/Mapping/Annotation/UploadableFileMimeType.php index 525045ff8c..aac630ff66 100644 --- a/src/Mapping/Annotation/UploadableFileMimeType.php +++ b/src/Mapping/Annotation/UploadableFileMimeType.php @@ -16,6 +16,7 @@ * UploadableFileMimeType Annotation for Uploadable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/UploadableFileName.php b/src/Mapping/Annotation/UploadableFileName.php index bd1c53c00e..0c5e10d94c 100644 --- a/src/Mapping/Annotation/UploadableFileName.php +++ b/src/Mapping/Annotation/UploadableFileName.php @@ -16,6 +16,7 @@ * UploadableFileName Annotation for Uploadable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author tiger-seo diff --git a/src/Mapping/Annotation/UploadableFilePath.php b/src/Mapping/Annotation/UploadableFilePath.php index ba6d1bd532..8ec5f2e0af 100644 --- a/src/Mapping/Annotation/UploadableFilePath.php +++ b/src/Mapping/Annotation/UploadableFilePath.php @@ -16,6 +16,7 @@ * UploadableFilePath Annotation for Uploadable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/UploadableFileSize.php b/src/Mapping/Annotation/UploadableFileSize.php index afd7fa0e6b..a0715bd78e 100644 --- a/src/Mapping/Annotation/UploadableFileSize.php +++ b/src/Mapping/Annotation/UploadableFileSize.php @@ -16,6 +16,7 @@ * UploadableFileSize Annotation for Uploadable behavioral extension * * @Annotation + * * @Target("PROPERTY") * * @author Gustavo Falco diff --git a/src/Mapping/Annotation/Versioned.php b/src/Mapping/Annotation/Versioned.php index 6b6891b34f..db99b7bc07 100644 --- a/src/Mapping/Annotation/Versioned.php +++ b/src/Mapping/Annotation/Versioned.php @@ -16,7 +16,9 @@ * Versioned annotation for Loggable behavioral extension * * @Annotation + * * @NamedArgumentConstructor + * * @Target("PROPERTY") * * @author Gediminas Morkevicius diff --git a/src/Mapping/Driver.php b/src/Mapping/Driver.php index 76a9893e58..7effdf54ae 100644 --- a/src/Mapping/Driver.php +++ b/src/Mapping/Driver.php @@ -31,10 +31,10 @@ interface Driver * @param ClassMetadata $meta * @param array $config * - * @return void - * * @throws InvalidMappingException if the mapping configuration is invalid * + * @return void + * * @phpstan-param ClassMetadata&(OdmClassMetadata|OrmClassMetadata) $meta */ public function readExtendedMetadata($meta, array &$config); diff --git a/src/Mapping/Driver/AbstractAnnotationDriver.php b/src/Mapping/Driver/AbstractAnnotationDriver.php index 34b82bd679..a4318b1655 100644 --- a/src/Mapping/Driver/AbstractAnnotationDriver.php +++ b/src/Mapping/Driver/AbstractAnnotationDriver.php @@ -79,6 +79,7 @@ public function setOriginalDriver($driver) * @param ClassMetadata $meta * * @return \ReflectionClass + * * @phpstan-return \ReflectionClass */ public function getMetaReflectionClass($meta) diff --git a/src/Mapping/Driver/AttributeAnnotationReader.php b/src/Mapping/Driver/AttributeAnnotationReader.php index 3d76c67830..85b045a464 100644 --- a/src/Mapping/Driver/AttributeAnnotationReader.php +++ b/src/Mapping/Driver/AttributeAnnotationReader.php @@ -14,6 +14,7 @@ /** * @author Gediminas Morkevicius + * * @license MIT License (http://www.opensource.org/licenses/mit-license.php) * * @internal diff --git a/src/Mapping/Driver/AttributeReader.php b/src/Mapping/Driver/AttributeReader.php index 1b79b9a263..741d68ee16 100644 --- a/src/Mapping/Driver/AttributeReader.php +++ b/src/Mapping/Driver/AttributeReader.php @@ -62,6 +62,7 @@ public function getPropertyAnnotation(\ReflectionProperty $property, string $ann /** * @param iterable<\ReflectionAttribute> $attributes + * * @phpstan-param iterable<\ReflectionAttribute> $attributes * * @return array diff --git a/src/Mapping/Event/AdapterInterface.php b/src/Mapping/Event/AdapterInterface.php index 683634c174..0fc8bc6fa3 100644 --- a/src/Mapping/Event/AdapterInterface.php +++ b/src/Mapping/Event/AdapterInterface.php @@ -65,6 +65,7 @@ public function getManagerName(); * @param ClassMetadata $meta * * @return string + * * @phpstan-return class-string */ public function getRootObjectClass($meta); diff --git a/src/ReferenceIntegrity/ReferenceIntegrityListener.php b/src/ReferenceIntegrity/ReferenceIntegrityListener.php index 113f505885..fbf6415581 100644 --- a/src/ReferenceIntegrity/ReferenceIntegrityListener.php +++ b/src/ReferenceIntegrity/ReferenceIntegrityListener.php @@ -42,6 +42,7 @@ public function getSubscribedEvents() * Maps additional metadata for the Document * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void diff --git a/src/References/Mapping/Driver/Annotation.php b/src/References/Mapping/Driver/Annotation.php index 9213da2e49..b8aa288fc2 100644 --- a/src/References/Mapping/Driver/Annotation.php +++ b/src/References/Mapping/Driver/Annotation.php @@ -78,9 +78,9 @@ public function readExtendedMetadata($meta, array &$config) foreach (self::ANNOTATIONS as $key => $annotation) { $config[$key] = []; foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/References/ReferencesListener.php b/src/References/ReferencesListener.php index e8ebea6820..b296f12448 100644 --- a/src/References/ReferencesListener.php +++ b/src/References/ReferencesListener.php @@ -31,7 +31,6 @@ * mappedBy?: string, * inversedBy?: string, * } - * * @phpstan-type ReferencesConfiguration = array{ * referenceMany?: array, * referenceManyEmbed?: array, @@ -62,6 +61,7 @@ public function __construct(array $managers = []) /** * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void diff --git a/src/Sluggable/Mapping/Driver/Annotation.php b/src/Sluggable/Mapping/Driver/Annotation.php index 89c554fc6a..76fe2e37a0 100644 --- a/src/Sluggable/Mapping/Driver/Annotation.php +++ b/src/Sluggable/Mapping/Driver/Annotation.php @@ -68,9 +68,9 @@ public function readExtendedMetadata($meta, array &$config) $class = $this->getMetaReflectionClass($meta); // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Sluggable/Mapping/Event/SluggableAdapter.php b/src/Sluggable/Mapping/Event/SluggableAdapter.php index b69cdc7742..502bb4dcf8 100644 --- a/src/Sluggable/Mapping/Event/SluggableAdapter.php +++ b/src/Sluggable/Mapping/Event/SluggableAdapter.php @@ -28,6 +28,7 @@ interface SluggableAdapter extends AdapterInterface * @param object $object * @param ClassMetadata $meta * @param string $slug + * * @phpstan-param SluggableConfiguration $config * * @return array> @@ -40,6 +41,7 @@ public function getSimilarSlugs($object, $meta, array $config, $slug); * @param object $object * @param string $target * @param string $replacement + * * @phpstan-param SluggableConfiguration $config * * @return int the number of updated records @@ -53,6 +55,7 @@ public function replaceRelative($object, array $config, $target, $replacement); * @param object $object * @param string $target * @param string $replacement + * * @phpstan-param SluggableConfiguration $config * * @return int the number of updated records diff --git a/src/Sluggable/SluggableListener.php b/src/Sluggable/SluggableListener.php index ce20391008..f6f472c515 100644 --- a/src/Sluggable/SluggableListener.php +++ b/src/Sluggable/SluggableListener.php @@ -226,6 +226,7 @@ public function removeManagedFilter($name) * Mapps additional metadata * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void diff --git a/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php b/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php index 2a6aa7688f..12d80c0b4b 100644 --- a/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php +++ b/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php @@ -77,6 +77,7 @@ public function addFilterCriteria(ClassMetadata $targetEntity): array /** * @param string $class + * * @phpstan-param class-string $class * * @return void @@ -88,6 +89,7 @@ public function disableForDocument($class) /** * @param string $class + * * @phpstan-param class-string $class * * @return void diff --git a/src/SoftDeleteable/Filter/SoftDeleteableFilter.php b/src/SoftDeleteable/Filter/SoftDeleteableFilter.php index 966899f160..a38c47c7f9 100644 --- a/src/SoftDeleteable/Filter/SoftDeleteableFilter.php +++ b/src/SoftDeleteable/Filter/SoftDeleteableFilter.php @@ -39,6 +39,7 @@ class SoftDeleteableFilter extends SQLFilter /** * @var array + * * @phpstan-var array */ protected $disabled = []; @@ -46,9 +47,9 @@ class SoftDeleteableFilter extends SQLFilter /** * @param string $targetTableAlias * - * @return string - * * @throws Exception + * + * @return string */ public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) { @@ -108,9 +109,9 @@ public function enableForEntity($class) } /** - * @return SoftDeleteableListener - * * @throws \RuntimeException + * + * @return SoftDeleteableListener */ protected function getListener() { diff --git a/src/SoftDeleteable/SoftDeleteableListener.php b/src/SoftDeleteable/SoftDeleteableListener.php index 24ebba5bbf..6bf17e9ccb 100644 --- a/src/SoftDeleteable/SoftDeleteableListener.php +++ b/src/SoftDeleteable/SoftDeleteableListener.php @@ -110,6 +110,7 @@ public function onFlush(EventArgs $args) * Maps additional metadata * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void diff --git a/src/Sortable/Mapping/Driver/Annotation.php b/src/Sortable/Mapping/Driver/Annotation.php index f19146e491..f0cdcfbb53 100644 --- a/src/Sortable/Mapping/Driver/Annotation.php +++ b/src/Sortable/Mapping/Driver/Annotation.php @@ -54,9 +54,9 @@ public function readExtendedMetadata($meta, array &$config) // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Sortable/Mapping/Event/Adapter/ORM.php b/src/Sortable/Mapping/Event/Adapter/ORM.php index 9f04164c9c..22b977c875 100644 --- a/src/Sortable/Mapping/Event/Adapter/ORM.php +++ b/src/Sortable/Mapping/Event/Adapter/ORM.php @@ -52,6 +52,7 @@ public function getMaxPosition(array $config, $meta, $groups) * @param array $relocation * @param array $delta * @param array $config + * * @phpstan-param SortableRelocation $relocation * * @return void diff --git a/src/Sortable/SortableListener.php b/src/Sortable/SortableListener.php index 3cb370914d..32c472645e 100644 --- a/src/Sortable/SortableListener.php +++ b/src/Sortable/SortableListener.php @@ -33,7 +33,6 @@ * position?: string, * useObjectClass?: class-string, * } - * * @phpstan-type SortableRelocation = array{ * name?: class-string, * groups?: mixed[], @@ -55,6 +54,7 @@ class SortableListener extends MappedEventSubscriber { /** * @var array> + * * @phpstan-var array */ private array $relocations = []; @@ -86,6 +86,7 @@ public function getSubscribedEvents() * Maps additional metadata * * @param LoadClassMetadataEventArgs $args + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $args * * @return void diff --git a/src/Timestampable/Mapping/Driver/Annotation.php b/src/Timestampable/Mapping/Driver/Annotation.php index 7d7c9a8e70..5c68f34713 100644 --- a/src/Timestampable/Mapping/Driver/Annotation.php +++ b/src/Timestampable/Mapping/Driver/Annotation.php @@ -54,9 +54,9 @@ public function readExtendedMetadata($meta, array &$config) $class = $this->getMetaReflectionClass($meta); // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Timestampable/Mapping/Driver/Attribute.php b/src/Timestampable/Mapping/Driver/Attribute.php index a5956401e5..9cad942b41 100644 --- a/src/Timestampable/Mapping/Driver/Attribute.php +++ b/src/Timestampable/Mapping/Driver/Attribute.php @@ -18,6 +18,7 @@ * extension. * * @author Kevin Mian Kraiker + * * @license MIT License (http://www.opensource.org/licenses/mit-license.php) * * @internal diff --git a/src/Timestampable/Traits/TimestampableDocument.php b/src/Timestampable/Traits/TimestampableDocument.php index 7ffa5b1f00..85af7fe8d6 100644 --- a/src/Timestampable/Traits/TimestampableDocument.php +++ b/src/Timestampable/Traits/TimestampableDocument.php @@ -22,7 +22,9 @@ trait TimestampableDocument { /** * @var \DateTime|null + * * @Gedmo\Timestampable(on="create") + * * @ODM\Field(type="date") */ #[Gedmo\Timestampable(on: 'create')] @@ -31,7 +33,9 @@ trait TimestampableDocument /** * @var \DateTime|null + * * @Gedmo\Timestampable(on="update") + * * @ODM\Field(type="date") */ #[Gedmo\Timestampable(on: 'update')] diff --git a/src/Timestampable/Traits/TimestampableEntity.php b/src/Timestampable/Traits/TimestampableEntity.php index ac809a7c81..2e69bbd371 100644 --- a/src/Timestampable/Traits/TimestampableEntity.php +++ b/src/Timestampable/Traits/TimestampableEntity.php @@ -22,7 +22,9 @@ trait TimestampableEntity { /** * @var \DateTime|null + * * @Gedmo\Timestampable(on="create") + * * @ORM\Column(type="datetime") */ #[Gedmo\Timestampable(on: 'create')] @@ -31,7 +33,9 @@ trait TimestampableEntity /** * @var \DateTime|null + * * @Gedmo\Timestampable(on="update") + * * @ORM\Column(type="datetime") */ #[Gedmo\Timestampable(on: 'update')] diff --git a/src/Tool/WrapperInterface.php b/src/Tool/WrapperInterface.php index 433a14978c..efa2eb6971 100644 --- a/src/Tool/WrapperInterface.php +++ b/src/Tool/WrapperInterface.php @@ -88,6 +88,7 @@ public function getIdentifier($single = true/* , bool $flatten = false */); * Get the root object class name. * * @return string + * * @phpstan-return class-string */ public function getRootObjectName(); diff --git a/src/Translatable/Document/Repository/TranslationRepository.php b/src/Translatable/Document/Repository/TranslationRepository.php index 877f012942..a372d029a8 100644 --- a/src/Translatable/Document/Repository/TranslationRepository.php +++ b/src/Translatable/Document/Repository/TranslationRepository.php @@ -164,6 +164,7 @@ public function findTranslations($document) * @param string $field * @param string $value * @param string $class + * * @phpstan-param class-string $class * * @return object|null instance of $class or null if not found diff --git a/src/Translatable/Entity/Repository/TranslationRepository.php b/src/Translatable/Entity/Repository/TranslationRepository.php index 0a1c0d193c..bb4a6dc459 100644 --- a/src/Translatable/Entity/Repository/TranslationRepository.php +++ b/src/Translatable/Entity/Repository/TranslationRepository.php @@ -94,8 +94,8 @@ public function translate($entity, $field, $locale, $value) $transMeta->getReflectionProperty('field')->setValue($trans, $field); $transMeta->getReflectionProperty('locale')->setValue($trans, $locale); } - if ($listener->getDefaultLocale() != $listener->getTranslatableLocale($entity, $meta, $this->getEntityManager()) && - $locale === $listener->getDefaultLocale()) { + if ($listener->getDefaultLocale() != $listener->getTranslatableLocale($entity, $meta, $this->getEntityManager()) + && $locale === $listener->getDefaultLocale()) { $listener->setTranslationInDefaultLocale(spl_object_id($entity), $field, $trans); $needsPersist = $listener->getPersistDefaultLocaleTranslation(); } @@ -167,6 +167,7 @@ public function findTranslations($entity) * @param string $field * @param string $value * @param string $class + * * @phpstan-param class-string $class * * @return object instance of $class or null if not found diff --git a/src/Translatable/Entity/Translation.php b/src/Translatable/Entity/Translation.php index 7ae1e2b80e..85a886b6b8 100644 --- a/src/Translatable/Entity/Translation.php +++ b/src/Translatable/Entity/Translation.php @@ -23,6 +23,7 @@ * name="ext_translations", * options={"row_format": "DYNAMIC"}, * indexes={ + * * @Index(name="translations_lookup_idx", columns={ * "locale", "object_class", "foreign_key" * }), @@ -34,6 +35,7 @@ * "locale", "object_class", "field", "foreign_key" * })} * ) + * * @Entity(repositoryClass="Gedmo\Translatable\Entity\Repository\TranslationRepository") */ #[Entity(repositoryClass: TranslationRepository::class)] diff --git a/src/Translatable/Mapping/Driver/Annotation.php b/src/Translatable/Mapping/Driver/Annotation.php index 70e4a7feb2..6d54e6e9c1 100644 --- a/src/Translatable/Mapping/Driver/Annotation.php +++ b/src/Translatable/Mapping/Driver/Annotation.php @@ -63,9 +63,9 @@ public function readExtendedMetadata($meta, array &$config) // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Translatable/Mapping/Event/Adapter/ORM.php b/src/Translatable/Mapping/Event/Adapter/ORM.php index e6765a106c..054614201f 100644 --- a/src/Translatable/Mapping/Event/Adapter/ORM.php +++ b/src/Translatable/Mapping/Event/Adapter/ORM.php @@ -234,6 +234,7 @@ public function setTranslationValue($object, $field, $value) * * @param mixed $key foreign key value * @param string $className translation class name + * * @phpstan-param class-string $className translation class name * * @return int|string transformed foreign key diff --git a/src/Translatable/Mapping/Event/TranslatableAdapter.php b/src/Translatable/Mapping/Event/TranslatableAdapter.php index 826f53fdb3..555b87718b 100644 --- a/src/Translatable/Mapping/Event/TranslatableAdapter.php +++ b/src/Translatable/Mapping/Event/TranslatableAdapter.php @@ -35,6 +35,7 @@ public function usesPersonalTranslation($translationClassName); * Get the default translation class used to store translations. * * @return string + * * @phpstan-return class-string */ public function getDefaultTranslationClass(); diff --git a/src/Translatable/Query/TreeWalker/TranslationWalker.php b/src/Translatable/Query/TreeWalker/TranslationWalker.php index 8a03baad6f..e09bdfe1a6 100644 --- a/src/Translatable/Query/TreeWalker/TranslationWalker.php +++ b/src/Translatable/Query/TreeWalker/TranslationWalker.php @@ -351,10 +351,10 @@ private function prepareTranslatedComponents(): void // Treat translation as original field type $fieldMapping = $meta->getFieldMapping($field); - if ((($this->platform instanceof MySQLPlatform) && - in_array($fieldMapping['type'], ['decimal'], true)) || - (!($this->platform instanceof MySQLPlatform) && - !in_array($fieldMapping['type'], ['datetime', 'datetimetz', 'date', 'time'], true))) { + if ((($this->platform instanceof MySQLPlatform) + && in_array($fieldMapping['type'], ['decimal'], true)) + || (!($this->platform instanceof MySQLPlatform) + && !in_array($fieldMapping['type'], ['datetime', 'datetimetz', 'date', 'time'], true))) { $type = Type::getType($fieldMapping['type']); $substituteField = 'CAST('.$substituteField.' AS '.$type->getSQLDeclaration($fieldMapping, $this->platform).')'; } @@ -467,7 +467,7 @@ private function getCastedForeignKey(string $component, string $typeFK, string $ case 'string': case 'guid': // need to cast to VARCHAR - $component = $component.'::VARCHAR'; + $component .= '::VARCHAR'; break; } diff --git a/src/Translatable/TranslatableListener.php b/src/Translatable/TranslatableListener.php index 6bf7e14e9b..c09f342c2a 100644 --- a/src/Translatable/TranslatableListener.php +++ b/src/Translatable/TranslatableListener.php @@ -207,6 +207,7 @@ public function addPendingTranslationInsert($oid, $translation) * Maps additional metadata * * @param LoadClassMetadataEventArgs $eventArgs + * * @phpstan-param LoadClassMetadataEventArgs, ObjectManager> $eventArgs * * @return void @@ -221,9 +222,11 @@ public function loadClassMetadata(EventArgs $eventArgs) * for the object $class * * @param string $class + * * @phpstan-param class-string $class * * @return string + * * @phpstan-return class-string */ public function getTranslationClass(TranslatableAdapter $ea, $class) @@ -353,7 +356,7 @@ public function getTranslatableLocale($object, $meta, $om = null) $locale = $value; } } elseif ($om instanceof DocumentManager) { - [ , $parentObject] = $om->getUnitOfWork()->getParentAssociation($object); + [, $parentObject] = $om->getUnitOfWork()->getParentAssociation($object); if (null !== $parentObject) { $parentMeta = $om->getClassMetadata(get_class($parentObject)); $locale = $this->getTranslatableLocale($parentObject, $parentMeta, $om); diff --git a/src/Translator/Entity/Translation.php b/src/Translator/Entity/Translation.php index 935933125c..0c22ee5842 100644 --- a/src/Translator/Entity/Translation.php +++ b/src/Translator/Entity/Translation.php @@ -30,7 +30,9 @@ abstract class Translation extends BaseTranslation * @var int * * @Column(type="integer") + * * @Id + * * @GeneratedValue */ #[Column(type: Types::INTEGER)] diff --git a/src/Tree/Entity/Repository/ClosureTreeRepository.php b/src/Tree/Entity/Repository/ClosureTreeRepository.php index 8c0ecbe0ac..61677bf7a2 100644 --- a/src/Tree/Entity/Repository/ClosureTreeRepository.php +++ b/src/Tree/Entity/Repository/ClosureTreeRepository.php @@ -399,8 +399,8 @@ public function getNodesHierarchyQueryBuilder($node = null, $direct = false, arr $defaultOptions = []; $options = array_merge($defaultOptions, $options); - if (isset($options['childSort']) && is_array($options['childSort']) && - isset($options['childSort']['field'], $options['childSort']['dir'])) { + if (isset($options['childSort']) && is_array($options['childSort']) + && isset($options['childSort']['field'], $options['childSort']['dir'])) { $q->addOrderBy( 'node.'.$options['childSort']['field'], 'asc' === strtolower($options['childSort']['dir']) ? 'asc' : 'desc' diff --git a/src/Tree/Entity/Repository/NestedTreeRepository.php b/src/Tree/Entity/Repository/NestedTreeRepository.php index 901875a37f..e7a01dac4d 100644 --- a/src/Tree/Entity/Repository/NestedTreeRepository.php +++ b/src/Tree/Entity/Repository/NestedTreeRepository.php @@ -169,14 +169,15 @@ public function getRootNodes($sortByField = null, $direction = 'asc') * Get the Tree path query builder by given $node * * @param object $node + * * @phpstan-param array{includeNode?: bool} $options * * options: * - includeNode: (bool) Whether to include the node itself. Defaults to true. * - * @return QueryBuilder - * * @throws InvalidArgumentException if input is not valid + * + * @return QueryBuilder */ public function getPathQueryBuilder($node/* , array $options = [] */) // @phpstan-ignore-line { @@ -226,6 +227,7 @@ public function getPathQueryBuilder($node/* , array $options = [] */) // @phpsta * Get the Tree path query by given $node * * @param object $node + * * @phpstan-param array{includeNode?: bool} $options * * options: @@ -247,6 +249,7 @@ public function getPathQuery($node/* , array $options = [] */) // @phpstan-ignor * Get the Tree path of Nodes by given $node * * @param object $node + * * @phpstan-param array{includeNode?: bool} $options * * options: @@ -524,9 +527,9 @@ public function getLeafs($root = null, $sortByField = null, $direction = 'ASC') * @param object $node * @param bool $includeSelf include the node itself * - * @return QueryBuilder - * * @throws InvalidArgumentException if input is invalid + * + * @return QueryBuilder */ public function getNextSiblingsQueryBuilder($node, $includeSelf = false) { @@ -604,9 +607,9 @@ public function getNextSiblings($node, $includeSelf = false) * @param object $node * @param bool $includeSelf include the node itself * - * @return QueryBuilder - * * @throws InvalidArgumentException if input is invalid + * + * @return QueryBuilder */ public function getPrevSiblingsQueryBuilder($node, $includeSelf = false) { @@ -655,9 +658,9 @@ public function getPrevSiblingsQueryBuilder($node, $includeSelf = false) * @param object $node * @param bool $includeSelf include the node itself * - * @return Query - * * @throws InvalidArgumentException if input is invalid + * + * @return Query */ public function getPrevSiblingsQuery($node, $includeSelf = false) { diff --git a/src/Tree/Hydrator/ORM/TreeObjectHydrator.php b/src/Tree/Hydrator/ORM/TreeObjectHydrator.php index 81fde52774..0dc984c6d1 100644 --- a/src/Tree/Hydrator/ORM/TreeObjectHydrator.php +++ b/src/Tree/Hydrator/ORM/TreeObjectHydrator.php @@ -203,6 +203,7 @@ protected function buildIdHashmap(array $nodes) /** * @param string $entityClass + * * @phpstan-param class-string $entityClass * * @return string @@ -228,6 +229,7 @@ protected function getParentField() /** * @param string $entityClass + * * @phpstan-param class-string $entityClass * * @return string diff --git a/src/Tree/Mapping/Driver/Annotation.php b/src/Tree/Mapping/Driver/Annotation.php index 754c855660..21fecebb82 100644 --- a/src/Tree/Mapping/Driver/Annotation.php +++ b/src/Tree/Mapping/Driver/Annotation.php @@ -129,9 +129,9 @@ public function readExtendedMetadata($meta, array &$config) // property annotations foreach ($class->getProperties() as $property) { - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/src/Tree/Mapping/Driver/Attribute.php b/src/Tree/Mapping/Driver/Attribute.php index 2e207d720a..41d53b3ea4 100644 --- a/src/Tree/Mapping/Driver/Attribute.php +++ b/src/Tree/Mapping/Driver/Attribute.php @@ -18,6 +18,7 @@ * extension. * * @author Kevin Mian Kraiker + * * @license MIT License (http://www.opensource.org/licenses/mit-license.php) * * @internal diff --git a/src/Tree/RepositoryInterface.php b/src/Tree/RepositoryInterface.php index 24eb6513d5..5c4009e834 100644 --- a/src/Tree/RepositoryInterface.php +++ b/src/Tree/RepositoryInterface.php @@ -62,9 +62,9 @@ public function getChildren($node = null, $direct = false, $sortByField = null, * @param object|null $node The object to count children for; if null, all nodes will be counted * @param bool $direct Flag indicating whether only direct children should be counted * - * @return int - * * @throws InvalidArgumentException if the input is invalid + * + * @return int */ public function childCount($node = null, $direct = false); } diff --git a/src/Tree/RepositoryUtils.php b/src/Tree/RepositoryUtils.php index 3ecb1abd3a..d39e9d6d8e 100644 --- a/src/Tree/RepositoryUtils.php +++ b/src/Tree/RepositoryUtils.php @@ -44,8 +44,8 @@ class RepositoryUtils implements RepositoryUtilsInterface /** * @param ObjectManager&(DocumentManager|EntityManagerInterface) $om - * @param TreeListener $listener - * @param RepositoryInterface $repo + * @param TreeListener $listener + * @param RepositoryInterface $repo */ public function __construct(ObjectManager $om, ClassMetadata $meta, $listener, $repo) { diff --git a/src/Tree/RepositoryUtilsInterface.php b/src/Tree/RepositoryUtilsInterface.php index 0dca508d19..a564d283bc 100644 --- a/src/Tree/RepositoryUtilsInterface.php +++ b/src/Tree/RepositoryUtilsInterface.php @@ -30,9 +30,9 @@ interface RepositoryUtilsInterface * - childSort: array || keys allowed: field: field to sort on, dir: direction. 'asc' or 'desc' * @param bool $includeNode Flag indicating whether the given node should be included in the results * - * @return array>|string - * * @throws InvalidArgumentException + * + * @return array>|string */ public function childrenHierarchy($node = null, $direct = false, array $options = [], $includeNode = false); @@ -52,9 +52,9 @@ public function childrenHierarchy($node = null, $direct = false, array $options * - childOpen: string || Closure ('
  • ') - start of node, Closure will be given $node as a parameter * - childClose: string ('
  • ') - close of node * - * @return array>|string - * * @throws InvalidArgumentException + * + * @return array>|string */ public function buildTree(array $nodes, array $options = []); diff --git a/src/Tree/Strategy/AbstractMaterializedPath.php b/src/Tree/Strategy/AbstractMaterializedPath.php index cf81877273..9876251967 100644 --- a/src/Tree/Strategy/AbstractMaterializedPath.php +++ b/src/Tree/Strategy/AbstractMaterializedPath.php @@ -440,8 +440,8 @@ public function processPostEventsActions(ObjectManager $om, AdapterInterface $ea throw new \InvalidArgumentException(sprintf('"%s" is not a valid action.', $action)); } - if (empty($this->pendingObjectsToInsert) && empty($this->pendingObjectsToUpdate) && - empty($this->pendingObjectsToRemove)) { + if (empty($this->pendingObjectsToInsert) && empty($this->pendingObjectsToUpdate) + && empty($this->pendingObjectsToRemove)) { $this->releaseTreeLocks($om, $ea); } } diff --git a/src/Tree/Strategy/ORM/Nested.php b/src/Tree/Strategy/ORM/Nested.php index 0bd9a4e353..a60e2fd74f 100644 --- a/src/Tree/Strategy/ORM/Nested.php +++ b/src/Tree/Strategy/ORM/Nested.php @@ -406,8 +406,8 @@ public function updateNode(EntityManagerInterface $em, $node, $parent, $position $wrapped->setPropertyValue($config['right'], $right); } $newRoot = $parentRoot; - } elseif (!isset($config['root']) || - ($meta->isSingleValuedAssociation($config['root']) && null !== $parent && ($newRoot = $meta->getFieldValue($node, $config['root'])))) { + } elseif (!isset($config['root']) + || ($meta->isSingleValuedAssociation($config['root']) && null !== $parent && ($newRoot = $meta->getFieldValue($node, $config['root'])))) { if (!isset($this->treeEdges[$meta->getName()])) { $this->treeEdges[$meta->getName()] = $this->max($em, $config['useObjectClass'], $newRoot) + 1; } diff --git a/src/Tree/Traits/NestedSetEntity.php b/src/Tree/Traits/NestedSetEntity.php index 44fbd5d9f7..345babde3b 100644 --- a/src/Tree/Traits/NestedSetEntity.php +++ b/src/Tree/Traits/NestedSetEntity.php @@ -22,7 +22,9 @@ trait NestedSetEntity { /** * @var int + * * @Gedmo\TreeRoot + * * @ORM\Column(name="root", type="integer", nullable=true) */ #[ORM\Column(name: 'root', type: Types::INTEGER, nullable: true)] @@ -31,7 +33,9 @@ trait NestedSetEntity /** * @var int + * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -40,7 +44,9 @@ trait NestedSetEntity /** * @var int + * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -49,7 +55,9 @@ trait NestedSetEntity /** * @var int + * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] diff --git a/src/Tree/Traits/NestedSetEntityUuid.php b/src/Tree/Traits/NestedSetEntityUuid.php index 2604f3a34a..7ae8f1c299 100644 --- a/src/Tree/Traits/NestedSetEntityUuid.php +++ b/src/Tree/Traits/NestedSetEntityUuid.php @@ -24,7 +24,9 @@ trait NestedSetEntityUuid /** * @var string + * * @Gedmo\TreeRoot + * * @ORM\Column(name="root", type="string", nullable=true) */ #[ORM\Column(name: 'root', type: Types::STRING, nullable: true)] diff --git a/src/Uploadable/UploadableListener.php b/src/Uploadable/UploadableListener.php index 1e83b3fb8a..97e0a85449 100644 --- a/src/Uploadable/UploadableListener.php +++ b/src/Uploadable/UploadableListener.php @@ -378,8 +378,6 @@ public function removeFile($filePath) * @param bool $appendNumber * @param object $object * - * @return array - * * @throws UploadableUploadException * @throws UploadableNoFileException * @throws UploadableExtensionException @@ -390,6 +388,8 @@ public function removeFile($filePath) * @throws UploadableNoTmpDirException * @throws UploadableCantWriteException * + * @return array + * * @phpstan-param class-string|false $filenameGeneratorClass */ public function moveFile(FileInfoInterface $fileInfo, $path, $filenameGeneratorClass = false, $overwrite = false, $appendNumber = false, $object = null) @@ -560,8 +560,8 @@ public function getDefaultPath() */ public function setDefaultFileInfoClass($defaultFileInfoClass) { - if (!is_string($defaultFileInfoClass) || !class_exists($defaultFileInfoClass) || - !is_subclass_of($defaultFileInfoClass, FileInfoInterface::class) + if (!is_string($defaultFileInfoClass) || !class_exists($defaultFileInfoClass) + || !is_subclass_of($defaultFileInfoClass, FileInfoInterface::class) ) { throw new InvalidArgumentException(sprintf('Default FileInfo class must be a valid class, and it must implement "%s".', FileInfoInterface::class)); } @@ -644,9 +644,9 @@ public function getMimeTypeGuesser() * @param array $config * @param object $object Entity * - * @return string - * * @throws UploadableNoPathDefinedException + * + * @return string */ protected function getPath(ClassMetadata $meta, array $config, $object) { diff --git a/tests/Gedmo/Blameable/Fixture/Document/Article.php b/tests/Gedmo/Blameable/Fixture/Document/Article.php index 4c13fbe3e9..367696a7c8 100644 --- a/tests/Gedmo/Blameable/Fixture/Document/Article.php +++ b/tests/Gedmo/Blameable/Fixture/Document/Article.php @@ -43,6 +43,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\Blameable(on="create") */ #[ODM\Field(type: MongoDBType::STRING)] @@ -51,6 +52,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\Blameable */ #[ODM\Field(type: MongoDBType::STRING)] @@ -59,6 +61,7 @@ class Article /** * @ODM\ReferenceOne(targetDocument="User") + * * @Gedmo\Blameable(on="create") */ #[ODM\ReferenceOne(targetDocument: User::class)] @@ -67,6 +70,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\Blameable(on="change", field="type.title", value="Published") */ #[Gedmo\Blameable(on: 'change', field: 'type.title', value: 'Published')] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/Article.php b/tests/Gedmo/Blameable/Fixture/Entity/Article.php index 4119f87eed..f780508a6c 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/Article.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/Article.php @@ -52,6 +52,7 @@ class Article implements Blameable /** * @Gedmo\Blameable(on="create") + * * @ORM\Column(name="created", type="string") */ #[ORM\Column(name: 'created', type: Types::STRING)] @@ -60,6 +61,7 @@ class Article implements Blameable /** * @ORM\Column(name="updated", type="string") + * * @Gedmo\Blameable */ #[Gedmo\Blameable] @@ -68,6 +70,7 @@ class Article implements Blameable /** * @ORM\Column(name="published", type="string", nullable=true) + * * @Gedmo\Blameable(on="change", field="type.title", value="Published") */ #[ORM\Column(name: 'published', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/Comment.php b/tests/Gedmo/Blameable/Fixture/Entity/Comment.php index acebae6f9c..6d93430f3b 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/Comment.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/Comment.php @@ -56,6 +56,7 @@ class Comment implements Blameable * @var string|null * * @ORM\Column(name="closed", type="string", nullable=true) + * * @Gedmo\Blameable(on="change", field="status", value=1) */ #[ORM\Column(name: 'closed', type: Types::STRING, nullable: true)] @@ -66,6 +67,7 @@ class Comment implements Blameable * @var string|null * * @ORM\Column(name="modified", type="string") + * * @Gedmo\Blameable(on="update") */ #[ORM\Column(name: 'modified', type: Types::STRING)] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/MappedSupperClass.php b/tests/Gedmo/Blameable/Fixture/Entity/MappedSupperClass.php index 9a89067a50..55f1f2c8de 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/MappedSupperClass.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/MappedSupperClass.php @@ -45,6 +45,7 @@ class MappedSupperClass * @var string|null * * @Gedmo\Translatable + * * @ORM\Column(name="name", type="string", length=191) */ #[Gedmo\Translatable] @@ -55,6 +56,7 @@ class MappedSupperClass * @var string|null * * @ORM\Column(name="created_by", type="string") + * * @Gedmo\Blameable(on="create") */ #[ORM\Column(name: 'created_by', type: Types::STRING)] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/SupperClassExtension.php b/tests/Gedmo/Blameable/Fixture/Entity/SupperClassExtension.php index 8abc09191d..af9d10241e 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/SupperClassExtension.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/SupperClassExtension.php @@ -22,6 +22,7 @@ class SupperClassExtension extends MappedSupperClass { /** * @ORM\Column(length=128) + * * @Gedmo\Translatable */ #[ORM\Column(length: 128)] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/TitledArticle.php b/tests/Gedmo/Blameable/Fixture/Entity/TitledArticle.php index a6f0682989..b94f43408f 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/TitledArticle.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/TitledArticle.php @@ -46,6 +46,7 @@ class TitledArticle implements Blameable /** * @ORM\Column(name="chtext", type="string", nullable=true) + * * @Gedmo\Blameable(on="change", field="text") */ #[ORM\Column(name: 'chtext', type: Types::STRING, nullable: true)] @@ -54,6 +55,7 @@ class TitledArticle implements Blameable /** * @ORM\Column(name="chtitle", type="string", nullable=true) + * * @Gedmo\Blameable(on="change", field="title") */ #[ORM\Column(name: 'chtitle', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Blameable/Fixture/Entity/WithoutInterface.php b/tests/Gedmo/Blameable/Fixture/Entity/WithoutInterface.php index 0e98a22015..653d9966ac 100644 --- a/tests/Gedmo/Blameable/Fixture/Entity/WithoutInterface.php +++ b/tests/Gedmo/Blameable/Fixture/Entity/WithoutInterface.php @@ -43,6 +43,7 @@ class WithoutInterface * @var string|null * * @Gedmo\Blameable(on="create") + * * @ORM\Column(type="string") */ #[ORM\Column(type: Types::STRING)] @@ -53,6 +54,7 @@ class WithoutInterface * @var string|null * * @ORM\Column(type="string") + * * @Gedmo\Blameable(on="update") */ #[ORM\Column(type: Types::STRING)] diff --git a/tests/Gedmo/IpTraceable/Fixture/Article.php b/tests/Gedmo/IpTraceable/Fixture/Article.php index 780b5c3e79..46797fe9a9 100644 --- a/tests/Gedmo/IpTraceable/Fixture/Article.php +++ b/tests/Gedmo/IpTraceable/Fixture/Article.php @@ -52,6 +52,7 @@ class Article implements IpTraceable /** * @Gedmo\IpTraceable(on="create") + * * @ORM\Column(name="created", type="string", length=45) */ #[ORM\Column(name: 'created', type: Types::STRING, length: 45)] @@ -60,6 +61,7 @@ class Article implements IpTraceable /** * @ORM\Column(name="updated", type="string", length=45) + * * @Gedmo\IpTraceable */ #[ORM\Column(name: 'updated', type: Types::STRING, length: 45)] @@ -68,6 +70,7 @@ class Article implements IpTraceable /** * @ORM\Column(name="published", type="string", length=45, nullable=true) + * * @Gedmo\IpTraceable(on="change", field="type.title", value="Published") */ #[ORM\Column(name: 'published', type: Types::STRING, length: 45, nullable: true)] @@ -76,6 +79,7 @@ class Article implements IpTraceable /** * @ORM\Column(name="content_changed", type="string", length=45, nullable=true) + * * @Gedmo\IpTraceable(on="change", field={"title", "body"}) */ #[ORM\Column(name: 'content_changed', type: Types::STRING, length: 45, nullable: true)] diff --git a/tests/Gedmo/IpTraceable/Fixture/Comment.php b/tests/Gedmo/IpTraceable/Fixture/Comment.php index 59acfb3749..50c032f3ba 100644 --- a/tests/Gedmo/IpTraceable/Fixture/Comment.php +++ b/tests/Gedmo/IpTraceable/Fixture/Comment.php @@ -56,6 +56,7 @@ class Comment implements IpTraceable * @var string|null * * @ORM\Column(name="closed", type="string", length=45, nullable=true) + * * @Gedmo\IpTraceable(on="change", field="status", value=1) */ #[ORM\Column(name: 'closed', type: Types::STRING, length: 45, nullable: true)] @@ -66,6 +67,7 @@ class Comment implements IpTraceable * @var string|null * * @ORM\Column(name="modified", type="string", length=45) + * * @Gedmo\IpTraceable(on="update") */ #[ORM\Column(name: 'modified', type: Types::STRING, length: 45)] diff --git a/tests/Gedmo/IpTraceable/Fixture/Document/Article.php b/tests/Gedmo/IpTraceable/Fixture/Document/Article.php index 28336e1270..bb1cb02b4b 100644 --- a/tests/Gedmo/IpTraceable/Fixture/Document/Article.php +++ b/tests/Gedmo/IpTraceable/Fixture/Document/Article.php @@ -23,6 +23,7 @@ class Article { /** * @var string|null + * * @ODM\Id */ #[ODM\Id] @@ -42,6 +43,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\IpTraceable(on="create") */ #[ODM\Field(type: MongoDBType::STRING)] @@ -50,6 +52,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\IpTraceable */ #[ODM\Field(type: MongoDBType::STRING)] @@ -58,6 +61,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\IpTraceable(on="change", field="type.title", value="Published") */ #[ODM\Field(type: MongoDBType::STRING)] @@ -66,6 +70,7 @@ class Article /** * @ODM\Field(type="string") + * * @Gedmo\IpTraceable(on="change", field="isReady", value=true) */ #[ODM\Field(type: MongoDBType::STRING)] diff --git a/tests/Gedmo/IpTraceable/Fixture/MappedSupperClass.php b/tests/Gedmo/IpTraceable/Fixture/MappedSupperClass.php index 2274ec52dd..17353d90a3 100644 --- a/tests/Gedmo/IpTraceable/Fixture/MappedSupperClass.php +++ b/tests/Gedmo/IpTraceable/Fixture/MappedSupperClass.php @@ -45,6 +45,7 @@ class MappedSupperClass * @var string|null * * @Gedmo\Translatable + * * @ORM\Column(name="name", type="string", length=191) */ #[Gedmo\Translatable] @@ -55,6 +56,7 @@ class MappedSupperClass * @var string|null * * @ORM\Column(name="created_at", type="string", length=45) + * * @Gedmo\IpTraceable(on="create") */ #[ORM\Column(name: 'created_at', type: Types::STRING, length: 45)] diff --git a/tests/Gedmo/IpTraceable/Fixture/SupperClassExtension.php b/tests/Gedmo/IpTraceable/Fixture/SupperClassExtension.php index 217daa437e..a38597045c 100644 --- a/tests/Gedmo/IpTraceable/Fixture/SupperClassExtension.php +++ b/tests/Gedmo/IpTraceable/Fixture/SupperClassExtension.php @@ -22,6 +22,7 @@ class SupperClassExtension extends MappedSupperClass { /** * @ORM\Column(length=128) + * * @Gedmo\Translatable */ #[ORM\Column(length: 128)] diff --git a/tests/Gedmo/IpTraceable/Fixture/TitledArticle.php b/tests/Gedmo/IpTraceable/Fixture/TitledArticle.php index f9f1bcb569..3447a24022 100644 --- a/tests/Gedmo/IpTraceable/Fixture/TitledArticle.php +++ b/tests/Gedmo/IpTraceable/Fixture/TitledArticle.php @@ -46,6 +46,7 @@ class TitledArticle implements IpTraceable /** * @ORM\Column(name="chtext", type="string", length=45, nullable=true) + * * @Gedmo\IpTraceable(on="change", field="text") */ #[ORM\Column(name: 'chtext', type: Types::STRING, length: 45, nullable: true)] @@ -54,6 +55,7 @@ class TitledArticle implements IpTraceable /** * @ORM\Column(name="chtitle", type="string", length=45, nullable=true) + * * @Gedmo\IpTraceable(on="change", field="title") */ #[ORM\Column(name: 'chtitle', type: Types::STRING, length: 45, nullable: true)] diff --git a/tests/Gedmo/IpTraceable/Fixture/WithoutInterface.php b/tests/Gedmo/IpTraceable/Fixture/WithoutInterface.php index fb252215cd..f83c2f3e25 100644 --- a/tests/Gedmo/IpTraceable/Fixture/WithoutInterface.php +++ b/tests/Gedmo/IpTraceable/Fixture/WithoutInterface.php @@ -41,7 +41,9 @@ class WithoutInterface /** * @var string|null + * * @Gedmo\IpTraceable(on="create") + * * @ORM\Column(type="string", length=45) */ #[ORM\Column(type: Types::STRING, length: 45)] @@ -50,7 +52,9 @@ class WithoutInterface /** * @var string|null + * * @ORM\Column(type="string", length=45) + * * @Gedmo\IpTraceable(on="update") */ #[ORM\Column(type: Types::STRING, length: 45)] diff --git a/tests/Gedmo/Loggable/Fixture/Document/Article.php b/tests/Gedmo/Loggable/Fixture/Document/Article.php index 1ebf9f3463..2ff55057a1 100644 --- a/tests/Gedmo/Loggable/Fixture/Document/Article.php +++ b/tests/Gedmo/Loggable/Fixture/Document/Article.php @@ -18,6 +18,7 @@ /** * @ODM\Document(collection="articles") + * * @Gedmo\Loggable */ #[ODM\Document(collection: 'articles')] @@ -26,6 +27,7 @@ class Article implements Loggable { /** * @var string|null + * * @ODM\Id */ #[ODM\Id] @@ -33,6 +35,7 @@ class Article implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -41,6 +44,7 @@ class Article implements Loggable /** * @ODM\EmbedOne(targetDocument="Gedmo\Tests\Loggable\Fixture\Document\Author") + * * @Gedmo\Versioned */ #[ODM\EmbedOne(targetDocument: Author::class)] diff --git a/tests/Gedmo/Loggable/Fixture/Document/Author.php b/tests/Gedmo/Loggable/Fixture/Document/Author.php index 95c4b7a6dc..b6010d47d3 100644 --- a/tests/Gedmo/Loggable/Fixture/Document/Author.php +++ b/tests/Gedmo/Loggable/Fixture/Document/Author.php @@ -18,6 +18,7 @@ /** * @ODM\EmbeddedDocument + * * @Gedmo\Loggable */ #[ODM\EmbeddedDocument] @@ -26,6 +27,7 @@ class Author implements Loggable { /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -34,6 +36,7 @@ class Author implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] diff --git a/tests/Gedmo/Loggable/Fixture/Document/Comment.php b/tests/Gedmo/Loggable/Fixture/Document/Comment.php index c12aaf113c..939d31972a 100644 --- a/tests/Gedmo/Loggable/Fixture/Document/Comment.php +++ b/tests/Gedmo/Loggable/Fixture/Document/Comment.php @@ -19,6 +19,7 @@ /** * @ODM\Document + * * @Gedmo\Loggable(logEntryClass="Gedmo\Tests\Loggable\Fixture\Document\Log\Comment") */ #[ODM\Document] @@ -27,6 +28,7 @@ class Comment implements Loggable { /** * @var string|null + * * @ODM\Id */ #[ODM\Id] @@ -34,6 +36,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -42,6 +45,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -50,6 +54,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ODM\ReferenceOne(targetDocument="Gedmo\Tests\Loggable\Fixture\Document\RelatedArticle", inversedBy="comments") */ #[ODM\ReferenceOne(targetDocument: RelatedArticle::class, inversedBy: 'comments')] @@ -58,6 +63,7 @@ class Comment implements Loggable /** * @ODM\EmbedOne(targetDocument="Gedmo\Tests\Loggable\Fixture\Document\Author") + * * @Gedmo\Versioned */ #[ODM\EmbedOne(targetDocument: Author::class)] diff --git a/tests/Gedmo/Loggable/Fixture/Document/RelatedArticle.php b/tests/Gedmo/Loggable/Fixture/Document/RelatedArticle.php index 2d74bc9458..08e848dc1b 100644 --- a/tests/Gedmo/Loggable/Fixture/Document/RelatedArticle.php +++ b/tests/Gedmo/Loggable/Fixture/Document/RelatedArticle.php @@ -20,6 +20,7 @@ /** * @ODM\Document + * * @Gedmo\Loggable */ #[ODM\Document] @@ -28,6 +29,7 @@ class RelatedArticle implements Loggable { /** * @var string|null + * * @ODM\Id */ #[ODM\Id] @@ -35,6 +37,7 @@ class RelatedArticle implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -43,6 +46,7 @@ class RelatedArticle implements Loggable /** * @Gedmo\Versioned + * * @ODM\Field(type="string") */ #[ODM\Field(type: Type::STRING)] @@ -51,6 +55,7 @@ class RelatedArticle implements Loggable /** * @var Collection + * * @ODM\ReferenceMany(targetDocument="Gedmo\Tests\Loggable\Fixture\Document\Comment", mappedBy="article") */ #[ODM\ReferenceMany(targetDocument: Comment::class, mappedBy: 'article')] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/Address.php b/tests/Gedmo/Loggable/Fixture/Entity/Address.php index 40555eaaf0..1b9f4ee86f 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/Address.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/Address.php @@ -20,6 +20,7 @@ * @author Fabian Sabau * * @ORM\Entity + * * @Gedmo\Loggable */ #[ORM\Entity] @@ -28,6 +29,7 @@ class Address implements Loggable { /** * @var int|null + * * @ORM\Id * @ORM\Column(name="id", type="integer") * @ORM\GeneratedValue(strategy="AUTO") @@ -39,7 +41,9 @@ class Address implements Loggable /** * @var string|null + * * @ORM\Column(type="string", length=191) + * * @Gedmo\Versioned */ #[ORM\Column(type: Types::STRING, length: 191)] @@ -48,7 +52,9 @@ class Address implements Loggable /** * @var string|null + * * @ORM\Column(type="string", length=191) + * * @Gedmo\Versioned */ #[ORM\Column(type: Types::STRING, length: 191)] @@ -57,7 +63,9 @@ class Address implements Loggable /** * @var Geo|null + * * @ORM\Embedded(class="Gedmo\Tests\Loggable\Fixture\Entity\Geo") + * * @Gedmo\Versioned */ #[ORM\Embedded(class: Geo::class)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/Article.php b/tests/Gedmo/Loggable/Fixture/Entity/Article.php index e2d2a7ed4c..dfb9bd209b 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/Article.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/Article.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ #[ORM\Entity] @@ -38,6 +39,7 @@ class Article implements Loggable /** * @Gedmo\Versioned + * * @ORM\Column(name="title", type="string", length=8) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 8)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/Comment.php b/tests/Gedmo/Loggable/Fixture/Entity/Comment.php index b4c957e416..b50e2289ef 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/Comment.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/Comment.php @@ -19,6 +19,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable(logEntryClass="Gedmo\Tests\Loggable\Fixture\Entity\Log\Comment") */ #[ORM\Entity] @@ -27,6 +28,7 @@ class Comment implements Loggable { /** * @var int|null + * * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") @@ -38,6 +40,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ORM\Column(length=128) */ #[ORM\Column(length: 128)] @@ -46,6 +49,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ORM\Column(type="text") */ #[ORM\Column(type: Types::TEXT)] @@ -54,6 +58,7 @@ class Comment implements Loggable /** * @Gedmo\Versioned + * * @ORM\ManyToOne(targetEntity="RelatedArticle", inversedBy="comments") */ #[ORM\ManyToOne(targetEntity: RelatedArticle::class, inversedBy: 'comments')] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/Composite.php b/tests/Gedmo/Loggable/Fixture/Entity/Composite.php index 150b112806..c631d2a56c 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/Composite.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/Composite.php @@ -15,6 +15,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ #[ORM\Entity] @@ -39,6 +40,7 @@ class Composite /** * @ORM\Column(length=8) + * * @Gedmo\Versioned */ #[ORM\Column(name: 'title', type: Types::STRING, length: 8)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/CompositeRelation.php b/tests/Gedmo/Loggable/Fixture/Entity/CompositeRelation.php index 80d4ff270f..0cde9c3c4a 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/CompositeRelation.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/CompositeRelation.php @@ -15,6 +15,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ #[ORM\Entity] @@ -39,6 +40,7 @@ class CompositeRelation /** * @ORM\Column(length=8) + * * @Gedmo\Versioned */ #[ORM\Column(name: 'title', type: Types::STRING, length: 8)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/Geo.php b/tests/Gedmo/Loggable/Fixture/Entity/Geo.php index e908d828a9..136fbb6bcc 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/Geo.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/Geo.php @@ -27,8 +27,11 @@ class Geo { /** * @var string|null + * * @phpstan-var numeric-string|null + * * @ORM\Column(type="decimal", precision=9, scale=6) + * * @Gedmo\Versioned */ #[ORM\Column(type: Types::DECIMAL, precision: 9, scale: 6)] @@ -37,8 +40,11 @@ class Geo /** * @var string|null + * * @phpstan-var numeric-string|null + * * @ORM\Column(type="decimal", precision=9, scale=6) + * * @Gedmo\Versioned */ #[ORM\Column(type: Types::DECIMAL, precision: 9, scale: 6)] @@ -47,7 +53,9 @@ class Geo /** * @var GeoLocation + * * @ORM\Embedded(class="Gedmo\Tests\Loggable\Fixture\Entity\GeoLocation") + * * @Gedmo\Versioned */ #[ORM\Embedded(class: GeoLocation::class)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/GeoLocation.php b/tests/Gedmo/Loggable/Fixture/Entity/GeoLocation.php index e6f4fae403..0495de48df 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/GeoLocation.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/GeoLocation.php @@ -27,7 +27,9 @@ class GeoLocation { /** * @var string + * * @ORM\Column(type="string") + * * @Gedmo\Versioned */ #[ORM\Column(type: Types::STRING)] diff --git a/tests/Gedmo/Loggable/Fixture/Entity/RelatedArticle.php b/tests/Gedmo/Loggable/Fixture/Entity/RelatedArticle.php index 4aa52ffb6c..a111553d5a 100644 --- a/tests/Gedmo/Loggable/Fixture/Entity/RelatedArticle.php +++ b/tests/Gedmo/Loggable/Fixture/Entity/RelatedArticle.php @@ -20,6 +20,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ #[ORM\Entity] @@ -28,6 +29,7 @@ class RelatedArticle implements Loggable { /** * @var int|null + * * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") @@ -39,6 +41,7 @@ class RelatedArticle implements Loggable /** * @Gedmo\Versioned + * * @ORM\Column(length=128) */ #[ORM\Column(length: 128)] @@ -47,6 +50,7 @@ class RelatedArticle implements Loggable /** * @Gedmo\Versioned + * * @ORM\Column(type="text") */ #[ORM\Column(Types::TEXT)] @@ -55,6 +59,7 @@ class RelatedArticle implements Loggable /** * @var Collection + * * @ORM\OneToMany(targetEntity="Comment", mappedBy="article") */ #[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'article')] diff --git a/tests/Gedmo/Mapping/Annotation/BaseClassAnnotationTestCase.php b/tests/Gedmo/Mapping/Annotation/BaseClassAnnotationTestCase.php index dbd8c86d02..86c07a1276 100644 --- a/tests/Gedmo/Mapping/Annotation/BaseClassAnnotationTestCase.php +++ b/tests/Gedmo/Mapping/Annotation/BaseClassAnnotationTestCase.php @@ -19,6 +19,7 @@ abstract class BaseClassAnnotationTestCase extends TestCase { /** * @requires PHP 8 + * * @dataProvider getValidParameters * * @param mixed $expectedReturn diff --git a/tests/Gedmo/Mapping/Annotation/BasePropertyAnnotationTestCase.php b/tests/Gedmo/Mapping/Annotation/BasePropertyAnnotationTestCase.php index f4e124814b..094c439a57 100644 --- a/tests/Gedmo/Mapping/Annotation/BasePropertyAnnotationTestCase.php +++ b/tests/Gedmo/Mapping/Annotation/BasePropertyAnnotationTestCase.php @@ -19,6 +19,7 @@ abstract class BasePropertyAnnotationTestCase extends TestCase { /** * @requires PHP 8 + * * @dataProvider getValidParameters * * @param mixed $expectedReturn diff --git a/tests/Gedmo/Mapping/Fixture/Document/User.php b/tests/Gedmo/Mapping/Fixture/Document/User.php index 5caf32bdd6..29687f3c5d 100644 --- a/tests/Gedmo/Mapping/Fixture/Document/User.php +++ b/tests/Gedmo/Mapping/Fixture/Document/User.php @@ -28,12 +28,14 @@ class User /** * @Ext\Encode(type="sha1", secret="xxx") + * * @ODM\Field(type="string") */ private ?string $name = null; /** * @Ext\Encode(type="md5") + * * @ODM\Field(type="string") */ private ?string $password = null; diff --git a/tests/Gedmo/Mapping/Fixture/Loggable.php b/tests/Gedmo/Mapping/Fixture/Loggable.php index f02e9eccdf..e7072cbc84 100644 --- a/tests/Gedmo/Mapping/Fixture/Loggable.php +++ b/tests/Gedmo/Mapping/Fixture/Loggable.php @@ -14,6 +14,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ class Loggable @@ -29,6 +30,7 @@ class Loggable /** * @ORM\Column(name="title", type="string", length=64) + * * @Gedmo\Versioned */ private ?string $title = null; diff --git a/tests/Gedmo/Mapping/Fixture/LoggableComposite.php b/tests/Gedmo/Mapping/Fixture/LoggableComposite.php index cf8213c443..f050db6aa0 100644 --- a/tests/Gedmo/Mapping/Fixture/LoggableComposite.php +++ b/tests/Gedmo/Mapping/Fixture/LoggableComposite.php @@ -14,6 +14,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ class LoggableComposite @@ -36,6 +37,7 @@ class LoggableComposite /** * @ORM\Column(name="title", type="string", length=64) + * * @Gedmo\Versioned */ private ?string $title = null; diff --git a/tests/Gedmo/Mapping/Fixture/LoggableCompositeRelation.php b/tests/Gedmo/Mapping/Fixture/LoggableCompositeRelation.php index cf5854c89f..87d413881f 100644 --- a/tests/Gedmo/Mapping/Fixture/LoggableCompositeRelation.php +++ b/tests/Gedmo/Mapping/Fixture/LoggableCompositeRelation.php @@ -14,6 +14,7 @@ /** * @ORM\Entity + * * @Gedmo\Loggable */ class LoggableCompositeRelation @@ -36,6 +37,7 @@ class LoggableCompositeRelation /** * @ORM\Column(name="title", type="string", length=64) + * * @Gedmo\Versioned */ private ?string $title = null; diff --git a/tests/Gedmo/Mapping/Fixture/MappedSuperClass.php b/tests/Gedmo/Mapping/Fixture/MappedSuperClass.php index 4a00e22888..c9d59543e5 100644 --- a/tests/Gedmo/Mapping/Fixture/MappedSuperClass.php +++ b/tests/Gedmo/Mapping/Fixture/MappedSuperClass.php @@ -35,6 +35,7 @@ class MappedSuperClass /** * @ORM\Column(length=32) + * * @Ext\Encode(type="md5") */ #[ORM\Column(length: 32)] diff --git a/tests/Gedmo/Mapping/Fixture/Sluggable.php b/tests/Gedmo/Mapping/Fixture/Sluggable.php index da1a6e6341..b49a35860a 100644 --- a/tests/Gedmo/Mapping/Fixture/Sluggable.php +++ b/tests/Gedmo/Mapping/Fixture/Sluggable.php @@ -61,6 +61,7 @@ class Sluggable * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=false, fields={"title", "code"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: false, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Mapping/Fixture/SoftDeleteable.php b/tests/Gedmo/Mapping/Fixture/SoftDeleteable.php index a9ecf3ca72..1d14bb12e8 100644 --- a/tests/Gedmo/Mapping/Fixture/SoftDeleteable.php +++ b/tests/Gedmo/Mapping/Fixture/SoftDeleteable.php @@ -16,6 +16,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ class SoftDeleteable diff --git a/tests/Gedmo/Mapping/Fixture/Unmapped/Timestampable.php b/tests/Gedmo/Mapping/Fixture/Unmapped/Timestampable.php index a3a753c178..5128ee4d97 100644 --- a/tests/Gedmo/Mapping/Fixture/Unmapped/Timestampable.php +++ b/tests/Gedmo/Mapping/Fixture/Unmapped/Timestampable.php @@ -22,6 +22,7 @@ class Timestampable /** * @var \DateTime + * * @Tmsp(on="create") */ private $created; diff --git a/tests/Gedmo/Mapping/Fixture/User.php b/tests/Gedmo/Mapping/Fixture/User.php index 7dbaa474fb..b617783645 100644 --- a/tests/Gedmo/Mapping/Fixture/User.php +++ b/tests/Gedmo/Mapping/Fixture/User.php @@ -37,6 +37,7 @@ class User /** * @Ext\Encode(type="sha1", secret="xxx") + * * @ORM\Column(length=64) */ #[ORM\Column(length: 64)] @@ -44,6 +45,7 @@ class User /** * @Ext\Encode(type="md5") + * * @ORM\Column(length=32) */ #[ORM\Column(length: 32)] diff --git a/tests/Gedmo/Mapping/Mock/Extension/Encoder/Mapping/Driver/Annotation.php b/tests/Gedmo/Mapping/Mock/Extension/Encoder/Mapping/Driver/Annotation.php index b2ec454339..5a95e1aaaa 100644 --- a/tests/Gedmo/Mapping/Mock/Extension/Encoder/Mapping/Driver/Annotation.php +++ b/tests/Gedmo/Mapping/Mock/Extension/Encoder/Mapping/Driver/Annotation.php @@ -35,9 +35,9 @@ public function readExtendedMetadata($meta, array &$config) // check only property annotations foreach ($class->getProperties() as $property) { // skip inherited properties - if ($meta->isMappedSuperclass && !$property->isPrivate() || - $meta->isInheritedField($property->name) || - isset($meta->associationMappings[$property->name]['inherited']) + if ($meta->isMappedSuperclass && !$property->isPrivate() + || $meta->isInheritedField($property->name) + || isset($meta->associationMappings[$property->name]['inherited']) ) { continue; } diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php index 783c217f01..fc8f1ecad8 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php @@ -27,6 +27,7 @@ class Type * @var Collection * * @ODM\ReferenceMany(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\ManyNullify\Article", mappedBy="type") + * * @Gedmo\ReferenceIntegrity("nullify") */ #[ODM\ReferenceMany(targetDocument: Article::class, mappedBy: 'type')] diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyPull/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyPull/Type.php index 46e7dee8e0..132ec46754 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyPull/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyPull/Type.php @@ -27,6 +27,7 @@ class Type * @var Collection * * @ODM\ReferenceMany(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\ManyPull\Article", mappedBy="types") + * * @Gedmo\ReferenceIntegrity("pull") */ #[ODM\ReferenceMany(targetDocument: Article::class, mappedBy: 'types')] diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php index 997972543b..92cd0f80f1 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php @@ -27,6 +27,7 @@ class Type * @var Collection * * @ODM\ReferenceMany(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\ManyRestrict\Article", mappedBy="type") + * * @Gedmo\ReferenceIntegrity("restrict") */ #[ODM\ReferenceMany(targetDocument: Article::class, mappedBy: 'type')] diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php index 8980fcc8a9..3ee2dde2cf 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php @@ -25,6 +25,7 @@ class Type * @var Article * * @ODM\ReferenceOne(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\OneNullify\Article", mappedBy="type") + * * @Gedmo\ReferenceIntegrity("nullify") */ #[ODM\ReferenceOne(targetDocument: Article::class, mappedBy: 'type')] diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OnePull/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OnePull/Type.php index 66608f4c4c..cf6cb2737f 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OnePull/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OnePull/Type.php @@ -25,6 +25,7 @@ class Type * @var Article|null * * @ODM\ReferenceOne(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\OnePull\Article", mappedBy="types") + * * @Gedmo\ReferenceIntegrity("pull") */ #[ODM\ReferenceOne(targetDocument: Article::class, mappedBy: 'types')] diff --git a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php index edb4608ad3..62bd70b315 100644 --- a/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php +++ b/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php @@ -25,6 +25,7 @@ class Type * @var Article|null * * @ODM\ReferenceOne(targetDocument="Gedmo\Tests\ReferenceIntegrity\Fixture\Document\OneRestrict\Article", mappedBy="type") + * * @Gedmo\ReferenceIntegrity("restrict") */ #[ODM\ReferenceOne(targetDocument: Article::class, mappedBy: 'type')] diff --git a/tests/Gedmo/Sluggable/Fixture/Article.php b/tests/Gedmo/Sluggable/Fixture/Article.php index 6a3220731b..9ea26ec64a 100644 --- a/tests/Gedmo/Sluggable/Fixture/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Article.php @@ -48,6 +48,7 @@ class Article implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "code"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/ArticleWithoutFields.php b/tests/Gedmo/Sluggable/Fixture/ArticleWithoutFields.php index 77351eab9d..2939f64305 100644 --- a/tests/Gedmo/Sluggable/Fixture/ArticleWithoutFields.php +++ b/tests/Gedmo/Sluggable/Fixture/ArticleWithoutFields.php @@ -36,6 +36,7 @@ class ArticleWithoutFields implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true)] diff --git a/tests/Gedmo/Sluggable/Fixture/ConfigurationArticle.php b/tests/Gedmo/Sluggable/Fixture/ConfigurationArticle.php index 623811a89e..63471b77d8 100644 --- a/tests/Gedmo/Sluggable/Fixture/ConfigurationArticle.php +++ b/tests/Gedmo/Sluggable/Fixture/ConfigurationArticle.php @@ -48,6 +48,7 @@ class ConfigurationArticle implements Sluggable /** * @Gedmo\Slug(updatable=false, unique=false, unique_base=null, fields={"title", "code"}) + * * @ORM\Column(name="slug", type="string", length=32) */ #[Gedmo\Slug(updatable: false, unique: false, unique_base: null, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDate.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDate.php index fec5e92db0..c1155b94dc 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDate.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDate.php @@ -48,6 +48,7 @@ class ArticleDate implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateImmutable.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateImmutable.php index f42494969e..8399a60982 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateImmutable.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateImmutable.php @@ -48,6 +48,7 @@ class ArticleDateImmutable implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTime.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTime.php index 91072d6cf0..59eff9d7c3 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTime.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTime.php @@ -48,6 +48,7 @@ class ArticleDateTime implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeImmutable.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeImmutable.php index 3b1a2ff3c1..732d626b0c 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeImmutable.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeImmutable.php @@ -48,6 +48,7 @@ class ArticleDateTimeImmutable implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTz.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTz.php index b1efd20bd7..db5ce39860 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTz.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTz.php @@ -48,6 +48,7 @@ class ArticleDateTimeTz implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTzImmutable.php b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTzImmutable.php index f665539f71..c6db077b74 100644 --- a/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTzImmutable.php +++ b/tests/Gedmo/Sluggable/Fixture/DateTimeTypes/ArticleDateTimeTzImmutable.php @@ -48,6 +48,7 @@ class ArticleDateTimeTzImmutable implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "createdAt"}, dateFormat="Y-m-d") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'createdAt'], dateFormat: 'Y-m-d')] diff --git a/tests/Gedmo/Sluggable/Fixture/Document/Article.php b/tests/Gedmo/Sluggable/Fixture/Document/Article.php index 348b4a9917..90a332ecca 100644 --- a/tests/Gedmo/Sluggable/Fixture/Document/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Document/Article.php @@ -45,6 +45,7 @@ class Article * @var string|null * * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "code"}) + * * @ODM\Field(type="string") */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Document/Handler/Article.php b/tests/Gedmo/Sluggable/Fixture/Document/Handler/Article.php index fb4ce9af2d..15f0f9c9d4 100644 --- a/tests/Gedmo/Sluggable/Fixture/Document/Handler/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Document/Handler/Article.php @@ -52,6 +52,7 @@ class Article * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="alias") * }) * }, separator="-", updatable=true, fields={"title", "code"}) + * * @ODM\Field(type="string") */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Document/Handler/RelativeSlug.php b/tests/Gedmo/Sluggable/Fixture/Document/Handler/RelativeSlug.php index 0d51543a5a..042ac30b36 100644 --- a/tests/Gedmo/Sluggable/Fixture/Document/Handler/RelativeSlug.php +++ b/tests/Gedmo/Sluggable/Fixture/Document/Handler/RelativeSlug.php @@ -46,6 +46,7 @@ class RelativeSlug * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"title"}) + * * @ODM\Field(type="string") */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Document/Handler/TreeSlug.php b/tests/Gedmo/Sluggable/Fixture/Document/Handler/TreeSlug.php index 80c3c4f31a..e116dda904 100644 --- a/tests/Gedmo/Sluggable/Fixture/Document/Handler/TreeSlug.php +++ b/tests/Gedmo/Sluggable/Fixture/Document/Handler/TreeSlug.php @@ -45,6 +45,7 @@ class TreeSlug * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"title"}) + * * @ODM\Field(type="string") */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/Article.php b/tests/Gedmo/Sluggable/Fixture/Handler/Article.php index 4cfcc2fa9b..3c0770541e 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/Article.php @@ -57,6 +57,7 @@ class Article implements Sluggable * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="slug") * }) * }, separator="-", updatable=true, fields={"title", "code"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/ArticleRelativeSlug.php b/tests/Gedmo/Sluggable/Fixture/Handler/ArticleRelativeSlug.php index ff5b4efabd..dda0412dec 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/ArticleRelativeSlug.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/ArticleRelativeSlug.php @@ -50,6 +50,7 @@ class ArticleRelativeSlug * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"title"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/Company.php b/tests/Gedmo/Sluggable/Fixture/Handler/Company.php index a2e1fe0c28..2070381905 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/Company.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/Company.php @@ -50,6 +50,7 @@ class Company * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="slug") * }) * }, fields={"title"}) + * * @ORM\Column(length=64, unique=true) */ #[Gedmo\Slug(fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/People/Occupation.php b/tests/Gedmo/Sluggable/Fixture/Handler/People/Occupation.php index b009e65a6c..0da9629935 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/People/Occupation.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/People/Occupation.php @@ -22,6 +22,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -60,6 +61,7 @@ class Occupation * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="slug") * }) * }, fields={"title"}) + * * @ORM\Column(length=64, unique=true) */ #[Gedmo\Slug(fields: ['title'])] @@ -70,6 +72,7 @@ class Occupation /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Occupation") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -87,6 +90,7 @@ class Occupation * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -97,6 +101,7 @@ class Occupation * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -107,6 +112,7 @@ class Occupation * @var int|null * * @Gedmo\TreeRoot + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -117,6 +123,7 @@ class Occupation * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/People/Person.php b/tests/Gedmo/Sluggable/Fixture/Handler/People/Person.php index c52cd34ee0..f793c4944a 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/People/Person.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/People/Person.php @@ -50,6 +50,7 @@ class Person * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"name"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['name'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlug.php b/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlug.php index 436d221a7d..45af7324b7 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlug.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlug.php @@ -22,6 +22,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -55,6 +56,7 @@ class TreeSlug implements Node * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(fields: ['title'], separator: '-', updatable: true)] @@ -64,6 +66,7 @@ class TreeSlug implements Node /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="TreeSlug") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -81,6 +84,7 @@ class TreeSlug implements Node * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -91,6 +95,7 @@ class TreeSlug implements Node * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -101,6 +106,7 @@ class TreeSlug implements Node * @var int|null * * @Gedmo\TreeRoot + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -111,6 +117,7 @@ class TreeSlug implements Node * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlugPrefixSuffix.php b/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlugPrefixSuffix.php index 678d628b6d..412f0fd7a3 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlugPrefixSuffix.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/TreeSlugPrefixSuffix.php @@ -21,6 +21,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -56,6 +57,7 @@ class TreeSlugPrefixSuffix * @Gedmo\SlugHandlerOption(name="suffix", value=".suffix") * }) * }, separator="-", updatable=true) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(fields: ['title'], separator: '-', updatable: true)] @@ -65,6 +67,7 @@ class TreeSlugPrefixSuffix /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="TreeSlugPrefixSuffix") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -82,6 +85,7 @@ class TreeSlugPrefixSuffix * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -92,6 +96,7 @@ class TreeSlugPrefixSuffix * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -102,6 +107,7 @@ class TreeSlugPrefixSuffix * @var int|null * * @Gedmo\TreeRoot + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -112,6 +118,7 @@ class TreeSlugPrefixSuffix * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Sluggable/Fixture/Handler/User.php b/tests/Gedmo/Sluggable/Fixture/Handler/User.php index a7d5aac379..3096c4463f 100644 --- a/tests/Gedmo/Sluggable/Fixture/Handler/User.php +++ b/tests/Gedmo/Sluggable/Fixture/Handler/User.php @@ -50,6 +50,7 @@ class User * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"username"}) + * * @ORM\Column(length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['username'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Identifier.php b/tests/Gedmo/Sluggable/Fixture/Identifier.php index 9514a826ad..8f73ac821e 100644 --- a/tests/Gedmo/Sluggable/Fixture/Identifier.php +++ b/tests/Gedmo/Sluggable/Fixture/Identifier.php @@ -24,7 +24,9 @@ class Identifier * @var string|null * * @ORM\Id + * * @Gedmo\Slug(separator="_", updatable=false, fields={"title"}) + * * @ORM\Column(length=32, unique=true) */ #[ORM\Id] diff --git a/tests/Gedmo/Sluggable/Fixture/Inheritance/Vehicle.php b/tests/Gedmo/Sluggable/Fixture/Inheritance/Vehicle.php index 13cfb9c077..1f331e44ca 100644 --- a/tests/Gedmo/Sluggable/Fixture/Inheritance/Vehicle.php +++ b/tests/Gedmo/Sluggable/Fixture/Inheritance/Vehicle.php @@ -52,6 +52,7 @@ class Vehicle * @var string|null * * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(length=128, unique=true) */ #[Gedmo\Slug(fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Inheritance2/Car.php b/tests/Gedmo/Sluggable/Fixture/Inheritance2/Car.php index 0792e1acde..7c7fcc2f9b 100644 --- a/tests/Gedmo/Sluggable/Fixture/Inheritance2/Car.php +++ b/tests/Gedmo/Sluggable/Fixture/Inheritance2/Car.php @@ -38,6 +38,7 @@ class Car extends Vehicle * @var string|null * * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(length=128, unique=true) */ #[Gedmo\Slug(fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue104/Icarus.php b/tests/Gedmo/Sluggable/Fixture/Issue104/Icarus.php index 6985a80610..baa3c52ced 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue104/Icarus.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue104/Icarus.php @@ -30,6 +30,7 @@ class Icarus extends Bus * @var string|null * * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(length=128, unique=true) */ #[Gedmo\Slug(fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue104/Vehicle.php b/tests/Gedmo/Sluggable/Fixture/Issue104/Vehicle.php index 680500101c..d1db13f333 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue104/Vehicle.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue104/Vehicle.php @@ -45,6 +45,7 @@ class Vehicle * @var string|null * * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(length=128, unique=true) */ #[Gedmo\Slug(fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue1058/Page.php b/tests/Gedmo/Sluggable/Fixture/Issue1058/Page.php index b8e05303d5..0786a46092 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue1058/Page.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue1058/Page.php @@ -49,6 +49,7 @@ class Page /** * @Gedmo\Slug(separator="-", fields={"title"}, unique=true, unique_base="user") + * * @ORM\Column(name="slug", type="string", length=64) */ #[Gedmo\Slug(separator: '-', unique: true, unique_base: 'user', fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue1151/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue1151/Article.php index f9fb9a450b..7dadbbcbe1 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue1151/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue1151/Article.php @@ -35,6 +35,7 @@ class Article /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title"}) + * * @ODM\Field(type="string") */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue1177/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue1177/Article.php index c1150ace5b..3cf85b95e8 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue1177/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue1177/Article.php @@ -42,6 +42,7 @@ class Article implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue1240/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue1240/Article.php index a229255b9a..5c7f96e079 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue1240/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue1240/Article.php @@ -42,6 +42,7 @@ class Article implements Sluggable /** * @Gedmo\Slug(separator="+", updatable=true, fields={"title"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '+', updatable: true, fields: ['title'])] @@ -50,6 +51,7 @@ class Article implements Sluggable /** * @Gedmo\Slug(separator="+", updatable=true, fields={"title"}, style="camel") + * * @ORM\Column(name="camel_slug", type="string", length=64, unique=true) */ #[ORM\Column(name: 'camel_slug', type: Types::STRING, length: 64, unique: true)] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue131/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue131/Article.php index 29a986c15b..0503bca60e 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue131/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue131/Article.php @@ -43,6 +43,7 @@ class Article * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, fields={"title"}) + * * @ORM\Column(length=64, unique=true, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue449/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue449/Article.php index 639c17ec8a..c8fb0f2508 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue449/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue449/Article.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] @@ -50,6 +51,7 @@ class Article implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title", "code"}) + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title', 'code'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue633/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue633/Article.php index 607ef1307e..0dbe90d1f3 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue633/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue633/Article.php @@ -49,6 +49,7 @@ class Article * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, unique_base="code", fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, unique_base: 'code', fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue827/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue827/Article.php index 7d1d3a1146..0accb06459 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue827/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue827/Article.php @@ -51,6 +51,7 @@ class Article * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, unique_base="category", fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, unique_base: 'category', fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue827/Category.php b/tests/Gedmo/Sluggable/Fixture/Issue827/Category.php index 56478f28a8..a5234c4bd8 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue827/Category.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue827/Category.php @@ -45,6 +45,7 @@ class Category * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue827/Comment.php b/tests/Gedmo/Sluggable/Fixture/Issue827/Comment.php index 05208b9c72..e464bc4748 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue827/Comment.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue827/Comment.php @@ -55,6 +55,7 @@ class Comment * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, unique_base="post", fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, unique_base: 'post', fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue827/Post.php b/tests/Gedmo/Sluggable/Fixture/Issue827/Post.php index 9acee86858..d87d520d48 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue827/Post.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue827/Post.php @@ -34,7 +34,9 @@ class Post * @var string|null * * @ORM\Id + * * @Gedmo\Slug(updatable=true, unique=true, fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[ORM\Id] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue939/Article.php b/tests/Gedmo/Sluggable/Fixture/Issue939/Article.php index d3f5d74595..0b6afe9d43 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue939/Article.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue939/Article.php @@ -51,6 +51,7 @@ class Article * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, unique_base="category", fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, unique_base: 'category', fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Issue939/Category.php b/tests/Gedmo/Sluggable/Fixture/Issue939/Category.php index cab9c77059..aa235ada52 100644 --- a/tests/Gedmo/Sluggable/Fixture/Issue939/Category.php +++ b/tests/Gedmo/Sluggable/Fixture/Issue939/Category.php @@ -45,6 +45,7 @@ class Category * @var string|null * * @Gedmo\Slug(updatable=true, unique=true, fields={"title"}) + * * @ORM\Column(length=64, nullable=true) */ #[Gedmo\Slug(updatable: true, unique: true, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/MappedSuperclass/Vehicle.php b/tests/Gedmo/Sluggable/Fixture/MappedSuperclass/Vehicle.php index b5ca720dfd..78bc20772e 100644 --- a/tests/Gedmo/Sluggable/Fixture/MappedSuperclass/Vehicle.php +++ b/tests/Gedmo/Sluggable/Fixture/MappedSuperclass/Vehicle.php @@ -35,6 +35,7 @@ class Vehicle * @var string|null * * @Gedmo\Slug(fields={"title"}, updatable=false) + * * @ORM\Column(length=128, unique=true) */ #[Gedmo\Slug(updatable: false, fields: ['title'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Page.php b/tests/Gedmo/Sluggable/Fixture/Page.php index ad887cb710..d409f2b6ad 100644 --- a/tests/Gedmo/Sluggable/Fixture/Page.php +++ b/tests/Gedmo/Sluggable/Fixture/Page.php @@ -45,6 +45,7 @@ class Page * @var string|null * * @Gedmo\Slug(style="camel", separator="_", fields={"content"}) + * * @ORM\Column(type="string", length=128) */ #[Gedmo\Slug(style: 'camel', separator: '_', fields: ['content'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Position.php b/tests/Gedmo/Sluggable/Fixture/Position.php index be7a0df948..f963510070 100644 --- a/tests/Gedmo/Sluggable/Fixture/Position.php +++ b/tests/Gedmo/Sluggable/Fixture/Position.php @@ -69,6 +69,7 @@ class Position * @var string|null * * @Gedmo\Slug(fields={"code", "other", "title", "prop"}) + * * @ORM\Column(length=64, unique=true) */ #[Gedmo\Slug(fields: ['code', 'other', 'title', 'prop'])] diff --git a/tests/Gedmo/Sluggable/Fixture/Prefix.php b/tests/Gedmo/Sluggable/Fixture/Prefix.php index 42d1b9507a..fc057739a3 100644 --- a/tests/Gedmo/Sluggable/Fixture/Prefix.php +++ b/tests/Gedmo/Sluggable/Fixture/Prefix.php @@ -44,6 +44,7 @@ class Prefix implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title"}, prefix="test-") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'], prefix: 'test-')] diff --git a/tests/Gedmo/Sluggable/Fixture/PrefixWithTreeHandler.php b/tests/Gedmo/Sluggable/Fixture/PrefixWithTreeHandler.php index db6b295b31..a9f55005ae 100644 --- a/tests/Gedmo/Sluggable/Fixture/PrefixWithTreeHandler.php +++ b/tests/Gedmo/Sluggable/Fixture/PrefixWithTreeHandler.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") * * @author Dirk Luijk @@ -53,6 +54,7 @@ class PrefixWithTreeHandler implements Sluggable * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"title"}, prefix="test.") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'], prefix: 'test.')] @@ -62,6 +64,7 @@ class PrefixWithTreeHandler implements Sluggable /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="PrefixWithTreeHandler") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -72,6 +75,7 @@ class PrefixWithTreeHandler implements Sluggable /** * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -80,6 +84,7 @@ class PrefixWithTreeHandler implements Sluggable /** * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -88,6 +93,7 @@ class PrefixWithTreeHandler implements Sluggable /** * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -96,6 +102,7 @@ class PrefixWithTreeHandler implements Sluggable /** * @Gedmo\TreeRoot + * * @ORM\Column(name="root", type="integer", nullable=true) */ #[ORM\Column(name: 'root', type: Types::INTEGER, nullable: true)] diff --git a/tests/Gedmo/Sluggable/Fixture/Suffix.php b/tests/Gedmo/Sluggable/Fixture/Suffix.php index c551423f7e..afba9d6b3d 100644 --- a/tests/Gedmo/Sluggable/Fixture/Suffix.php +++ b/tests/Gedmo/Sluggable/Fixture/Suffix.php @@ -44,6 +44,7 @@ class Suffix implements Sluggable /** * @Gedmo\Slug(separator="-", updatable=true, fields={"title"}, suffix=".test") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'], suffix: '.test')] diff --git a/tests/Gedmo/Sluggable/Fixture/SuffixWithTreeHandler.php b/tests/Gedmo/Sluggable/Fixture/SuffixWithTreeHandler.php index 90f5dc2343..d3be96b2cb 100644 --- a/tests/Gedmo/Sluggable/Fixture/SuffixWithTreeHandler.php +++ b/tests/Gedmo/Sluggable/Fixture/SuffixWithTreeHandler.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") * * @author Dirk Luijk @@ -53,6 +54,7 @@ class SuffixWithTreeHandler implements Sluggable * @Gedmo\SlugHandlerOption(name="separator", value="/") * }) * }, separator="-", updatable=true, fields={"title"}, suffix=".test") + * * @ORM\Column(name="slug", type="string", length=64, unique=true) */ #[Gedmo\Slug(separator: '-', updatable: true, fields: ['title'], suffix: '.test')] @@ -62,6 +64,7 @@ class SuffixWithTreeHandler implements Sluggable /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="SuffixWithTreeHandler") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ @@ -72,6 +75,7 @@ class SuffixWithTreeHandler implements Sluggable /** * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -80,6 +84,7 @@ class SuffixWithTreeHandler implements Sluggable /** * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -88,6 +93,7 @@ class SuffixWithTreeHandler implements Sluggable /** * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -96,6 +102,7 @@ class SuffixWithTreeHandler implements Sluggable /** * @Gedmo\TreeRoot + * * @ORM\Column(name="root", type="integer", nullable=true) */ #[ORM\Column(name: 'root', type: Types::INTEGER, nullable: true)] diff --git a/tests/Gedmo/Sluggable/Fixture/TransArticleManySlug.php b/tests/Gedmo/Sluggable/Fixture/TransArticleManySlug.php index 11ea452b7b..559f7dfc9c 100644 --- a/tests/Gedmo/Sluggable/Fixture/TransArticleManySlug.php +++ b/tests/Gedmo/Sluggable/Fixture/TransArticleManySlug.php @@ -39,6 +39,7 @@ class TransArticleManySlug implements Sluggable, Translatable /** * @Gedmo\Translatable + * * @ORM\Column(type="string", length=64) */ #[ORM\Column(type: Types::STRING, length: 64)] @@ -55,6 +56,7 @@ class TransArticleManySlug implements Sluggable, Translatable * @var string|null * * @Gedmo\Slug(fields={"uniqueTitle"}) + * * @ORM\Column(type="string", length=128) */ #[Gedmo\Slug(fields: ['uniqueTitle'])] @@ -63,6 +65,7 @@ class TransArticleManySlug implements Sluggable, Translatable /** * @Gedmo\Translatable + * * @ORM\Column(type="string", length=16) */ #[ORM\Column(type: Types::STRING, length: 16)] @@ -74,6 +77,7 @@ class TransArticleManySlug implements Sluggable, Translatable * * @Gedmo\Translatable * @Gedmo\Slug(fields={"title", "code"}) + * * @ORM\Column(type="string", length=128) */ #[ORM\Column(type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Sluggable/Fixture/TranslatableArticle.php b/tests/Gedmo/Sluggable/Fixture/TranslatableArticle.php index dd7cf5cd41..951a0a04fb 100644 --- a/tests/Gedmo/Sluggable/Fixture/TranslatableArticle.php +++ b/tests/Gedmo/Sluggable/Fixture/TranslatableArticle.php @@ -39,6 +39,7 @@ class TranslatableArticle implements Sluggable, Translatable /** * @Gedmo\Translatable + * * @ORM\Column(type="string", length=64) */ #[ORM\Column(type: Types::STRING, length: 64)] @@ -47,6 +48,7 @@ class TranslatableArticle implements Sluggable, Translatable /** * @Gedmo\Translatable + * * @ORM\Column(type="string", length=16) */ #[ORM\Column(type: Types::STRING, length: 16)] @@ -58,6 +60,7 @@ class TranslatableArticle implements Sluggable, Translatable * * @Gedmo\Translatable * @Gedmo\Slug(fields={"title", "code"}) + * * @ORM\Column(type="string", length=128) */ #[ORM\Column(type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Document/User.php b/tests/Gedmo/SoftDeleteable/Fixture/Document/User.php index cff63c2c90..c17155b1e0 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Document/User.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Document/User.php @@ -17,6 +17,7 @@ /** * @ODM\Document(collection="users") + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ODM\Document(collection: 'users')] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Document/UserTimeAware.php b/tests/Gedmo/SoftDeleteable/Fixture/Document/UserTimeAware.php index 477fbd693e..0816f418a8 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Document/UserTimeAware.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Document/UserTimeAware.php @@ -17,6 +17,7 @@ /** * @ODM\Document(collection="users") + * * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true) */ #[ODM\Document(collection: 'users')] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Address.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Address.php index 46ec7bfc7f..fdb25f80c8 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Address.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Address.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Article.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Article.php index c37084005d..5c6c1e0a35 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Article.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Article.php @@ -19,6 +19,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Comment.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Comment.php index c02d75a645..e58dcda565 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Comment.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Comment.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/MappedSuperclass.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/MappedSuperclass.php index b835c81942..93cb455692 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/MappedSuperclass.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/MappedSuperclass.php @@ -17,6 +17,7 @@ /** * @ORM\MappedSuperclass + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\MappedSuperclass] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Module.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Module.php index 89dfc723b3..7ced4c2876 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Module.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Module.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/OtherArticle.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/OtherArticle.php index 35f8fe1ae6..f3692c3c7e 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/OtherArticle.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/OtherArticle.php @@ -19,6 +19,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Page.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Page.php index 8d0c4f9b39..8cf55a05a7 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Page.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Page.php @@ -22,6 +22,7 @@ * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"page": "Page", "mega_page": "MegaPage"}) + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Person.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Person.php index 9b808eef61..cbec15111f 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/Person.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/Person.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true) */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/User.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/User.php index 4fa98f16a9..d835d9b711 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/User.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/User.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ #[ORM\Entity] diff --git a/tests/Gedmo/SoftDeleteable/Fixture/Entity/UserNoHardDelete.php b/tests/Gedmo/SoftDeleteable/Fixture/Entity/UserNoHardDelete.php index bc54fbdc03..d2e7409063 100644 --- a/tests/Gedmo/SoftDeleteable/Fixture/Entity/UserNoHardDelete.php +++ b/tests/Gedmo/SoftDeleteable/Fixture/Entity/UserNoHardDelete.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\SoftDeleteable(fieldName="deletedAt", hardDelete=false) */ #[ORM\Entity] diff --git a/tests/Gedmo/Sortable/Fixture/AbstractNode.php b/tests/Gedmo/Sortable/Fixture/AbstractNode.php index 64d50cfe72..66dc4136f7 100644 --- a/tests/Gedmo/Sortable/Fixture/AbstractNode.php +++ b/tests/Gedmo/Sortable/Fixture/AbstractNode.php @@ -45,6 +45,7 @@ class AbstractNode * @var string|null * * @Gedmo\SortableGroup + * * @ORM\Column(type="string", length=191) */ #[Gedmo\SortableGroup] @@ -55,6 +56,7 @@ class AbstractNode * @var int|null * * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Author.php b/tests/Gedmo/Sortable/Fixture/Author.php index c2623bd357..4e3722d760 100644 --- a/tests/Gedmo/Sortable/Fixture/Author.php +++ b/tests/Gedmo/Sortable/Fixture/Author.php @@ -42,6 +42,7 @@ class Author /** * @Gedmo\SortableGroup + * * @ORM\ManyToOne(targetEntity="Paper", inversedBy="authors") */ #[Gedmo\SortableGroup] @@ -50,6 +51,7 @@ class Author /** * @Gedmo\SortablePosition + * * @ORM\Column(name="position", type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/CustomerType.php b/tests/Gedmo/Sortable/Fixture/CustomerType.php index c058964a16..7fb77bbfa0 100644 --- a/tests/Gedmo/Sortable/Fixture/CustomerType.php +++ b/tests/Gedmo/Sortable/Fixture/CustomerType.php @@ -49,6 +49,7 @@ class CustomerType /** * @Gedmo\SortablePosition + * * @ORM\Column(name="position", type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Document/Article.php b/tests/Gedmo/Sortable/Fixture/Document/Article.php index 2a535ff12f..82c0015957 100644 --- a/tests/Gedmo/Sortable/Fixture/Document/Article.php +++ b/tests/Gedmo/Sortable/Fixture/Document/Article.php @@ -25,6 +25,7 @@ class Article * @var int|null * * @Gedmo\SortablePosition + * * @ODM\Field(type="int") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Document/Kid.php b/tests/Gedmo/Sortable/Fixture/Document/Kid.php index e73dab1a61..a74ad221e0 100644 --- a/tests/Gedmo/Sortable/Fixture/Document/Kid.php +++ b/tests/Gedmo/Sortable/Fixture/Document/Kid.php @@ -25,6 +25,7 @@ class Kid * @var int|null * * @Gedmo\SortablePosition + * * @ODM\Field(type="int") */ #[Gedmo\SortablePosition] @@ -35,6 +36,7 @@ class Kid * @var \DateTime|null * * @Gedmo\SortableGroup + * * @ODM\Field(type="date") */ #[Gedmo\SortableGroup] diff --git a/tests/Gedmo/Sortable/Fixture/Document/Post.php b/tests/Gedmo/Sortable/Fixture/Document/Post.php index d55e9392e7..aaba8bf972 100644 --- a/tests/Gedmo/Sortable/Fixture/Document/Post.php +++ b/tests/Gedmo/Sortable/Fixture/Document/Post.php @@ -25,6 +25,7 @@ class Post * @var int|null * * @Gedmo\SortablePosition + * * @ODM\Field(type="int") */ #[Gedmo\SortablePosition] @@ -35,6 +36,7 @@ class Post * @var Category|null * * @Gedmo\SortableGroup + * * @ODM\ReferenceOne(targetDocument="Gedmo\Tests\Sortable\Fixture\Document\Category") */ #[Gedmo\SortableGroup] diff --git a/tests/Gedmo/Sortable/Fixture/Event.php b/tests/Gedmo/Sortable/Fixture/Event.php index d52b4ceda8..9a1481ec97 100644 --- a/tests/Gedmo/Sortable/Fixture/Event.php +++ b/tests/Gedmo/Sortable/Fixture/Event.php @@ -36,6 +36,7 @@ class Event /** * @Gedmo\SortableGroup + * * @ORM\Column(type="datetime") */ #[Gedmo\SortableGroup] @@ -50,6 +51,7 @@ class Event /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Item.php b/tests/Gedmo/Sortable/Fixture/Item.php index ec195e8312..50ed86a013 100644 --- a/tests/Gedmo/Sortable/Fixture/Item.php +++ b/tests/Gedmo/Sortable/Fixture/Item.php @@ -42,6 +42,7 @@ class Item /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] @@ -50,6 +51,7 @@ class Item /** * @Gedmo\SortableGroup + * * @ORM\ManyToOne(targetEntity="Category", inversedBy="items") */ #[Gedmo\SortableGroup] diff --git a/tests/Gedmo/Sortable/Fixture/ItemWithDateColumn.php b/tests/Gedmo/Sortable/Fixture/ItemWithDateColumn.php index 571e219d35..01241d8acf 100644 --- a/tests/Gedmo/Sortable/Fixture/ItemWithDateColumn.php +++ b/tests/Gedmo/Sortable/Fixture/ItemWithDateColumn.php @@ -32,6 +32,7 @@ class ItemWithDateColumn /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] @@ -40,6 +41,7 @@ class ItemWithDateColumn /** * @Gedmo\SortableGroup + * * @ORM\Column(type="date") */ #[Gedmo\SortableGroup] diff --git a/tests/Gedmo/Sortable/Fixture/SimpleListItem.php b/tests/Gedmo/Sortable/Fixture/SimpleListItem.php index 4b330533b8..8ec6e67242 100644 --- a/tests/Gedmo/Sortable/Fixture/SimpleListItem.php +++ b/tests/Gedmo/Sortable/Fixture/SimpleListItem.php @@ -42,6 +42,7 @@ class SimpleListItem /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Transport/Reservation.php b/tests/Gedmo/Sortable/Fixture/Transport/Reservation.php index e832151f72..2c0ac1823a 100644 --- a/tests/Gedmo/Sortable/Fixture/Transport/Reservation.php +++ b/tests/Gedmo/Sortable/Fixture/Transport/Reservation.php @@ -43,6 +43,7 @@ class Reservation * Bus destination * * @Gedmo\SortableGroup + * * @ORM\Column(length=191) */ #[Gedmo\SortableGroup] @@ -51,6 +52,7 @@ class Reservation /** * @Gedmo\SortableGroup + * * @ORM\Column(type="datetime") */ #[Gedmo\SortableGroup] @@ -59,6 +61,7 @@ class Reservation /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Sortable/Fixture/Transport/Vehicle.php b/tests/Gedmo/Sortable/Fixture/Transport/Vehicle.php index 9d002346f0..7b6d789f62 100644 --- a/tests/Gedmo/Sortable/Fixture/Transport/Vehicle.php +++ b/tests/Gedmo/Sortable/Fixture/Transport/Vehicle.php @@ -45,6 +45,7 @@ class Vehicle /** * @Gedmo\SortableGroup + * * @ORM\ManyToOne(targetEntity="Engine") */ #[Gedmo\SortableGroup] @@ -59,6 +60,7 @@ class Vehicle /** * @Gedmo\SortablePosition + * * @ORM\Column(type="integer") */ #[Gedmo\SortablePosition] diff --git a/tests/Gedmo/Timestampable/Fixture/Article.php b/tests/Gedmo/Timestampable/Fixture/Article.php index 527e764f74..ed1fd49314 100644 --- a/tests/Gedmo/Timestampable/Fixture/Article.php +++ b/tests/Gedmo/Timestampable/Fixture/Article.php @@ -64,6 +64,7 @@ class Article implements Timestampable /** * @Gedmo\Timestampable(on="create") + * * @ORM\Column(name="created", type="date") */ #[Gedmo\Timestampable(on: 'create')] @@ -72,6 +73,7 @@ class Article implements Timestampable /** * @ORM\Column(name="updated", type="datetime") + * * @Gedmo\Timestampable */ #[ORM\Column(name: 'updated', type: Types::DATETIME_MUTABLE)] @@ -80,6 +82,7 @@ class Article implements Timestampable /** * @ORM\Column(name="published", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="type.title", value="Published") */ #[ORM\Column(name: 'published', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -88,6 +91,7 @@ class Article implements Timestampable /** * @ORM\Column(name="content_changed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field={"title", "body"}) */ #[ORM\Column(name: 'content_changed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -97,6 +101,7 @@ class Article implements Timestampable * @var \DateTime|null * * @ORM\Column(name="author_changed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field={"author.name", "author.email"}) */ #[ORM\Column(name: 'author_changed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -121,6 +126,7 @@ class Article implements Timestampable * @var \DateTimeInterface|null * * @ORM\Column(name="reached_relevant_level", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="level", value="10") */ #[ORM\Column(name: 'reached_relevant_level', type: Types::DATE_MUTABLE, nullable: true)] diff --git a/tests/Gedmo/Timestampable/Fixture/ArticleCarbon.php b/tests/Gedmo/Timestampable/Fixture/ArticleCarbon.php index 0eaea1bdf2..673117ff3c 100644 --- a/tests/Gedmo/Timestampable/Fixture/ArticleCarbon.php +++ b/tests/Gedmo/Timestampable/Fixture/ArticleCarbon.php @@ -68,6 +68,7 @@ class ArticleCarbon implements Timestampable * @var \DateTime|Carbon|null * * @Gedmo\Timestampable(on="create") + * * @ORM\Column(name="created", type="date") */ #[Gedmo\Timestampable(on: 'create')] @@ -78,6 +79,7 @@ class ArticleCarbon implements Timestampable * @var \DateTime|CarbonImmutable|null * * @ORM\Column(name="updated", type="datetime") + * * @Gedmo\Timestampable */ #[ORM\Column(name: 'updated', type: Types::DATETIME_MUTABLE)] @@ -88,6 +90,7 @@ class ArticleCarbon implements Timestampable * @var \DateTime|CarbonImmutable|null * * @ORM\Column(name="published", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="type.title", value="Published") */ #[ORM\Column(name: 'published', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -98,6 +101,7 @@ class ArticleCarbon implements Timestampable * @var \DateTime|CarbonImmutable|null * * @ORM\Column(name="content_changed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field={"title", "body"}) */ #[ORM\Column(name: 'content_changed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -108,6 +112,7 @@ class ArticleCarbon implements Timestampable * @var CarbonImmutable|null * * @ORM\Column(name="author_changed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field={"author.name", "author.email"}) */ #[ORM\Column(name: 'author_changed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -132,6 +137,7 @@ class ArticleCarbon implements Timestampable * @var \DateTimeInterface|null * * @ORM\Column(name="reached_relevant_level", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="level", value="10") */ #[ORM\Column(name: 'reached_relevant_level', type: Types::DATE_MUTABLE, nullable: true)] diff --git a/tests/Gedmo/Timestampable/Fixture/Comment.php b/tests/Gedmo/Timestampable/Fixture/Comment.php index fd540f3117..2631fd345d 100644 --- a/tests/Gedmo/Timestampable/Fixture/Comment.php +++ b/tests/Gedmo/Timestampable/Fixture/Comment.php @@ -58,6 +58,7 @@ class Comment implements Timestampable * @var \DateTime|null * * @ORM\Column(name="closed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="status", value=1) */ #[ORM\Column(name: 'closed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -68,6 +69,7 @@ class Comment implements Timestampable * @var \DateTime|null * * @ORM\Column(name="modified", type="time") + * * @Gedmo\Timestampable(on="update") */ #[ORM\Column(name: 'modified', type: Types::TIME_MUTABLE)] diff --git a/tests/Gedmo/Timestampable/Fixture/CommentCarbon.php b/tests/Gedmo/Timestampable/Fixture/CommentCarbon.php index 52770e65ab..94057e5d3e 100644 --- a/tests/Gedmo/Timestampable/Fixture/CommentCarbon.php +++ b/tests/Gedmo/Timestampable/Fixture/CommentCarbon.php @@ -57,6 +57,7 @@ class CommentCarbon implements Timestampable * @var CarbonImmutable|null * * @ORM\Column(name="closed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="status", value=1) */ #[ORM\Column(name: 'closed', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -67,6 +68,7 @@ class CommentCarbon implements Timestampable * @var \DateTime|null * * @ORM\Column(name="modified", type="time") + * * @Gedmo\Timestampable(on="update") */ #[ORM\Column(name: 'modified', type: Types::TIME_MUTABLE)] diff --git a/tests/Gedmo/Timestampable/Fixture/Document/Article.php b/tests/Gedmo/Timestampable/Fixture/Document/Article.php index 64923fdfba..8a12f57a96 100644 --- a/tests/Gedmo/Timestampable/Fixture/Document/Article.php +++ b/tests/Gedmo/Timestampable/Fixture/Document/Article.php @@ -46,6 +46,7 @@ class Article * @var int|Timestamp|null * * @ODM\Field(type="timestamp") + * * @Gedmo\Timestampable(on="create") */ #[Gedmo\Timestampable(on: 'create')] @@ -54,6 +55,7 @@ class Article /** * @ODM\Field(type="date") + * * @Gedmo\Timestampable */ #[Gedmo\Timestampable] @@ -62,6 +64,7 @@ class Article /** * @ODM\Field(type="date") + * * @Gedmo\Timestampable(on="change", field="type.title", value="Published") */ #[Gedmo\Timestampable(on: 'change', field: 'type.title', value: 'Published')] @@ -70,6 +73,7 @@ class Article /** * @ODM\Field(type="date") + * * @Gedmo\Timestampable(on="change", field="isReady", value=true) */ #[Gedmo\Timestampable(on: 'change', field: 'isReady', value: true)] diff --git a/tests/Gedmo/Timestampable/Fixture/Document/Tag.php b/tests/Gedmo/Timestampable/Fixture/Document/Tag.php index 6587e2eb94..f2224a46a1 100644 --- a/tests/Gedmo/Timestampable/Fixture/Document/Tag.php +++ b/tests/Gedmo/Timestampable/Fixture/Document/Tag.php @@ -31,6 +31,7 @@ class Tag /** * @ODM\Field(type="date") + * * @Gedmo\Timestampable(on="create") * * @var \DateTime @@ -41,6 +42,7 @@ class Tag /** * @ODM\Field(type="date") + * * @Gedmo\Timestampable * * @var \DateTime diff --git a/tests/Gedmo/Timestampable/Fixture/MappedSupperClass.php b/tests/Gedmo/Timestampable/Fixture/MappedSupperClass.php index e4142e2503..1118ac7e0b 100644 --- a/tests/Gedmo/Timestampable/Fixture/MappedSupperClass.php +++ b/tests/Gedmo/Timestampable/Fixture/MappedSupperClass.php @@ -45,6 +45,7 @@ class MappedSupperClass * @var string|null * * @Gedmo\Translatable + * * @ORM\Column(name="name", type="string", length=191) */ #[Gedmo\Translatable] @@ -55,6 +56,7 @@ class MappedSupperClass * @var \DateTime|null * * @ORM\Column(name="created_at", type="datetime") + * * @Gedmo\Timestampable(on="create") */ #[ORM\Column(name: 'created_at', type: Types::DATETIME_MUTABLE)] diff --git a/tests/Gedmo/Timestampable/Fixture/SupperClassExtension.php b/tests/Gedmo/Timestampable/Fixture/SupperClassExtension.php index 894cbc38ab..827a7f44a9 100644 --- a/tests/Gedmo/Timestampable/Fixture/SupperClassExtension.php +++ b/tests/Gedmo/Timestampable/Fixture/SupperClassExtension.php @@ -22,6 +22,7 @@ class SupperClassExtension extends MappedSupperClass { /** * @ORM\Column(length=128) + * * @Gedmo\Translatable */ #[ORM\Column(length: 128)] diff --git a/tests/Gedmo/Timestampable/Fixture/TitledArticle.php b/tests/Gedmo/Timestampable/Fixture/TitledArticle.php index 98ffbd1b38..edc19f2f55 100644 --- a/tests/Gedmo/Timestampable/Fixture/TitledArticle.php +++ b/tests/Gedmo/Timestampable/Fixture/TitledArticle.php @@ -52,6 +52,7 @@ class TitledArticle implements Timestampable /** * @ORM\Column(name="chtext", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="text") */ #[ORM\Column(name: 'chtext', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -60,6 +61,7 @@ class TitledArticle implements Timestampable /** * @ORM\Column(name="chtitle", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="title") */ #[ORM\Column(name: 'chtitle', type: Types::DATETIME_MUTABLE, nullable: true)] @@ -68,6 +70,7 @@ class TitledArticle implements Timestampable /** * @ORM\Column(name="closed", type="datetime", nullable=true) + * * @Gedmo\Timestampable(on="change", field="state", value={"Published", "Closed"}) */ #[ORM\Column(name: 'closed', type: Types::DATETIME_MUTABLE, nullable: true)] diff --git a/tests/Gedmo/Timestampable/Fixture/WithoutInterface.php b/tests/Gedmo/Timestampable/Fixture/WithoutInterface.php index c66ecd7037..e1de7f07f1 100644 --- a/tests/Gedmo/Timestampable/Fixture/WithoutInterface.php +++ b/tests/Gedmo/Timestampable/Fixture/WithoutInterface.php @@ -43,6 +43,7 @@ class WithoutInterface * @var \DateTime|null * * @Gedmo\Timestampable(on="create") + * * @ORM\Column(type="date") */ #[Gedmo\Timestampable(on: 'create')] @@ -53,6 +54,7 @@ class WithoutInterface * @var \DateTime|null * * @ORM\Column(type="datetime") + * * @Gedmo\Timestampable(on="update") */ #[ORM\Column(type: Types::DATETIME_MUTABLE)] diff --git a/tests/Gedmo/Translatable/Fixture/Article.php b/tests/Gedmo/Translatable/Fixture/Article.php index c2295a8bee..0b766544bb 100644 --- a/tests/Gedmo/Translatable/Fixture/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Article.php @@ -38,6 +38,7 @@ class Article implements Translatable /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] @@ -46,6 +47,7 @@ class Article implements Translatable /** * @Gedmo\Translatable + * * @ORM\Column(name="content", type="text", nullable=true) */ #[Gedmo\Translatable] @@ -54,6 +56,7 @@ class Article implements Translatable /** * @Gedmo\Translatable(fallback=false) + * * @ORM\Column(name="views", type="integer", nullable=true) */ #[Gedmo\Translatable(fallback: false)] @@ -62,6 +65,7 @@ class Article implements Translatable /** * @Gedmo\Translatable(fallback=true) + * * @ORM\Column(name="author", type="string", nullable=true) */ #[Gedmo\Translatable(fallback: true)] diff --git a/tests/Gedmo/Translatable/Fixture/Comment.php b/tests/Gedmo/Translatable/Fixture/Comment.php index 24132317fa..8f0bcc2869 100644 --- a/tests/Gedmo/Translatable/Fixture/Comment.php +++ b/tests/Gedmo/Translatable/Fixture/Comment.php @@ -35,6 +35,7 @@ class Comment /** * @Gedmo\Translatable + * * @ORM\Column(name="subject", type="string", length=128) */ #[Gedmo\Translatable] @@ -43,6 +44,7 @@ class Comment /** * @Gedmo\Translatable + * * @ORM\Column(name="message", type="text") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Company.php b/tests/Gedmo/Translatable/Fixture/Company.php index 6cd427b077..18cc9a62dd 100644 --- a/tests/Gedmo/Translatable/Fixture/Company.php +++ b/tests/Gedmo/Translatable/Fixture/Company.php @@ -36,6 +36,7 @@ class Company implements Translatable /** * @ORM\Column(name="title", type="string", length=128) + * * @Gedmo\Translatable */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/CompanyEmbedLink.php b/tests/Gedmo/Translatable/Fixture/CompanyEmbedLink.php index 37a8ed5db4..a2d7d74094 100644 --- a/tests/Gedmo/Translatable/Fixture/CompanyEmbedLink.php +++ b/tests/Gedmo/Translatable/Fixture/CompanyEmbedLink.php @@ -25,6 +25,7 @@ class CompanyEmbedLink * @var string * * @ORM\Column(name="website", type="string", length=191, nullable=true) + * * @Gedmo\Translatable */ #[Gedmo\Translatable] @@ -35,6 +36,7 @@ class CompanyEmbedLink * @var string * * @ORM\Column(name="facebook", type="string", length=191, nullable=true) + * * @Gedmo\Translatable */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Document/Article.php b/tests/Gedmo/Translatable/Fixture/Document/Article.php index 898bde335e..628cfd61a7 100644 --- a/tests/Gedmo/Translatable/Fixture/Document/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Document/Article.php @@ -31,6 +31,7 @@ class Article /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] @@ -39,6 +40,7 @@ class Article /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] @@ -50,6 +52,7 @@ class Article * * @Gedmo\Slug(fields={"title", "code"}) * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Document/Personal/Article.php b/tests/Gedmo/Translatable/Fixture/Document/Personal/Article.php index 12ca0d1015..b83f2d4f18 100644 --- a/tests/Gedmo/Translatable/Fixture/Document/Personal/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Document/Personal/Article.php @@ -19,6 +19,7 @@ /** * @Gedmo\TranslationEntity(class="Gedmo\Tests\Translatable\Fixture\Document\Personal\ArticleTranslation") + * * @MongoODM\Document(collection="articles") */ #[Gedmo\TranslationEntity(class: ArticleTranslation::class)] @@ -35,6 +36,7 @@ class Article /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Document/SimpleArticle.php b/tests/Gedmo/Translatable/Fixture/Document/SimpleArticle.php index 42609a38f1..a67d23eade 100644 --- a/tests/Gedmo/Translatable/Fixture/Document/SimpleArticle.php +++ b/tests/Gedmo/Translatable/Fixture/Document/SimpleArticle.php @@ -31,6 +31,7 @@ class SimpleArticle /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] @@ -39,6 +40,7 @@ class SimpleArticle /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/File.php b/tests/Gedmo/Translatable/Fixture/File.php index e3fc45b4fb..4e4dc983a4 100644 --- a/tests/Gedmo/Translatable/Fixture/File.php +++ b/tests/Gedmo/Translatable/Fixture/File.php @@ -41,6 +41,7 @@ class File /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Image.php b/tests/Gedmo/Translatable/Fixture/Image.php index 874a941a44..e90905129e 100644 --- a/tests/Gedmo/Translatable/Fixture/Image.php +++ b/tests/Gedmo/Translatable/Fixture/Image.php @@ -22,6 +22,7 @@ class Image extends File { /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue1123/ChildEntity.php b/tests/Gedmo/Translatable/Fixture/Issue1123/ChildEntity.php index cf2a63f602..7bf92e055d 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue1123/ChildEntity.php +++ b/tests/Gedmo/Translatable/Fixture/Issue1123/ChildEntity.php @@ -26,6 +26,7 @@ class ChildEntity extends BaseEntity implements Translatable { /** * @Gedmo\Translatable + * * @ORM\Column(name="childTitle", type="string", length=128, nullable=true) */ #[ORM\Column(name: 'childTitle', type: Types::STRING, length: 128, nullable: true)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue114/Article.php b/tests/Gedmo/Translatable/Fixture/Issue114/Article.php index 6a018ee0b1..1955b0ec65 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue114/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Issue114/Article.php @@ -35,6 +35,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue114/Category.php b/tests/Gedmo/Translatable/Fixture/Issue114/Category.php index 9c0fda3248..9e7f1be879 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue114/Category.php +++ b/tests/Gedmo/Translatable/Fixture/Issue114/Category.php @@ -37,6 +37,7 @@ class Category /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue138/Article.php b/tests/Gedmo/Translatable/Fixture/Issue138/Article.php index 9a49ae0e59..3245cbb668 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue138/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Issue138/Article.php @@ -35,6 +35,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[Gedmo\Translatable] @@ -43,6 +44,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue165/SimpleArticle.php b/tests/Gedmo/Translatable/Fixture/Issue165/SimpleArticle.php index 70efaa3d39..965427526d 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue165/SimpleArticle.php +++ b/tests/Gedmo/Translatable/Fixture/Issue165/SimpleArticle.php @@ -31,6 +31,7 @@ class SimpleArticle /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] @@ -39,6 +40,7 @@ class SimpleArticle /** * @Gedmo\Translatable + * * @MongoODM\Field(type="string") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue173/Article.php b/tests/Gedmo/Translatable/Fixture/Issue173/Article.php index dd311cb08d..d9405d0c36 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue173/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Issue173/Article.php @@ -35,6 +35,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue173/Category.php b/tests/Gedmo/Translatable/Fixture/Issue173/Category.php index e73f038a98..13497f4be2 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue173/Category.php +++ b/tests/Gedmo/Translatable/Fixture/Issue173/Category.php @@ -37,6 +37,7 @@ class Category /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue173/Product.php b/tests/Gedmo/Translatable/Fixture/Issue173/Product.php index 711db75490..53c720539c 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue173/Product.php +++ b/tests/Gedmo/Translatable/Fixture/Issue173/Product.php @@ -35,6 +35,7 @@ class Product /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue2152/EntityWithTranslatableBoolean.php b/tests/Gedmo/Translatable/Fixture/Issue2152/EntityWithTranslatableBoolean.php index 754db0cb8b..cc038c4be4 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue2152/EntityWithTranslatableBoolean.php +++ b/tests/Gedmo/Translatable/Fixture/Issue2152/EntityWithTranslatableBoolean.php @@ -37,6 +37,7 @@ class EntityWithTranslatableBoolean /** * @Gedmo\Translatable + * * @ORM\Column(type="string", nullable=true) */ #[ORM\Column(type: Types::STRING, nullable: true)] @@ -45,6 +46,7 @@ class EntityWithTranslatableBoolean /** * @Gedmo\Translatable + * * @ORM\Column(type="string", nullable=true) */ #[ORM\Column(type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue2167/Article.php b/tests/Gedmo/Translatable/Fixture/Issue2167/Article.php index 8e3edb727e..8c8ae28e96 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue2167/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Issue2167/Article.php @@ -35,6 +35,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue75/Article.php b/tests/Gedmo/Translatable/Fixture/Issue75/Article.php index 5358cd6fd8..427648edd7 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue75/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Issue75/Article.php @@ -37,6 +37,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue75/File.php b/tests/Gedmo/Translatable/Fixture/Issue75/File.php index 0bc4296478..7367544ab9 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue75/File.php +++ b/tests/Gedmo/Translatable/Fixture/Issue75/File.php @@ -35,6 +35,7 @@ class File /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Translatable/Fixture/Issue75/Image.php b/tests/Gedmo/Translatable/Fixture/Issue75/Image.php index 37e568c0d8..1c1d085f55 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue75/Image.php +++ b/tests/Gedmo/Translatable/Fixture/Issue75/Image.php @@ -37,6 +37,7 @@ class Image /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Issue922/Post.php b/tests/Gedmo/Translatable/Fixture/Issue922/Post.php index d9a5a7cff5..c59a434205 100644 --- a/tests/Gedmo/Translatable/Fixture/Issue922/Post.php +++ b/tests/Gedmo/Translatable/Fixture/Issue922/Post.php @@ -35,6 +35,7 @@ class Post /** * @Gedmo\Translatable + * * @ORM\Column(type="datetime", nullable=true) */ #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] @@ -43,6 +44,7 @@ class Post /** * @Gedmo\Translatable + * * @ORM\Column(type="time") */ #[ORM\Column(type: Types::TIME_MUTABLE)] @@ -51,6 +53,7 @@ class Post /** * @Gedmo\Translatable + * * @ORM\Column(type="date") */ #[ORM\Column(type: Types::DATE_MUTABLE)] @@ -59,6 +62,7 @@ class Post /** * @Gedmo\Translatable + * * @ORM\Column(type="boolean") */ #[ORM\Column(type: Types::BOOLEAN)] diff --git a/tests/Gedmo/Translatable/Fixture/MixedValue.php b/tests/Gedmo/Translatable/Fixture/MixedValue.php index 6ca436c708..7c1cf709ff 100644 --- a/tests/Gedmo/Translatable/Fixture/MixedValue.php +++ b/tests/Gedmo/Translatable/Fixture/MixedValue.php @@ -35,6 +35,7 @@ class MixedValue /** * @Gedmo\Translatable + * * @ORM\Column(type="datetime") */ #[Gedmo\Translatable] @@ -45,6 +46,7 @@ class MixedValue * @var mixed * * @Gedmo\Translatable + * * @ORM\Column(type="custom") */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Person.php b/tests/Gedmo/Translatable/Fixture/Person.php index a91882b646..2c336b1add 100644 --- a/tests/Gedmo/Translatable/Fixture/Person.php +++ b/tests/Gedmo/Translatable/Fixture/Person.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\TranslationEntity(class="PersonTranslation") */ #[ORM\Entity] @@ -37,6 +38,7 @@ class Person /** * @Gedmo\Translatable + * * @ORM\Column(name="name", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Personal/Article.php b/tests/Gedmo/Translatable/Fixture/Personal/Article.php index ab1923c57d..dfd92456be 100644 --- a/tests/Gedmo/Translatable/Fixture/Personal/Article.php +++ b/tests/Gedmo/Translatable/Fixture/Personal/Article.php @@ -19,6 +19,7 @@ /** * @Gedmo\TranslationEntity(class="Gedmo\Tests\Translatable\Fixture\Personal\PersonalArticleTranslation") + * * @ORM\Entity */ #[ORM\Entity] @@ -39,6 +40,7 @@ class Article /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[ORM\Column(length: 128)] diff --git a/tests/Gedmo/Translatable/Fixture/Sport.php b/tests/Gedmo/Translatable/Fixture/Sport.php index 05d40db2d8..85e556eaad 100644 --- a/tests/Gedmo/Translatable/Fixture/Sport.php +++ b/tests/Gedmo/Translatable/Fixture/Sport.php @@ -35,6 +35,7 @@ class Sport /** * @Gedmo\Translatable + * * @ORM\Column(length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/StringIdentifier.php b/tests/Gedmo/Translatable/Fixture/StringIdentifier.php index d7f163c347..630dc6eeb5 100644 --- a/tests/Gedmo/Translatable/Fixture/StringIdentifier.php +++ b/tests/Gedmo/Translatable/Fixture/StringIdentifier.php @@ -31,6 +31,7 @@ class StringIdentifier /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Translatable/Fixture/Template/ArticleTemplate.php b/tests/Gedmo/Translatable/Fixture/Template/ArticleTemplate.php index 7f2bc393ce..00d0a061e3 100644 --- a/tests/Gedmo/Translatable/Fixture/Template/ArticleTemplate.php +++ b/tests/Gedmo/Translatable/Fixture/Template/ArticleTemplate.php @@ -32,6 +32,7 @@ class ArticleTemplate protected $locale; /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=128) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 128)] @@ -40,6 +41,7 @@ class ArticleTemplate /** * @Gedmo\Translatable + * * @ORM\Column(name="content", type="text") */ #[ORM\Column(name: 'content', type: Types::TEXT)] diff --git a/tests/Gedmo/Translatable/Fixture/TemplatedArticle.php b/tests/Gedmo/Translatable/Fixture/TemplatedArticle.php index 4878e720e8..2d791058fb 100644 --- a/tests/Gedmo/Translatable/Fixture/TemplatedArticle.php +++ b/tests/Gedmo/Translatable/Fixture/TemplatedArticle.php @@ -36,6 +36,7 @@ class TemplatedArticle extends ArticleTemplate /** * @Gedmo\Translatable + * * @ORM\Column(type="string", length=128) */ #[Gedmo\Translatable] diff --git a/tests/Gedmo/Tree/Fixture/ANode.php b/tests/Gedmo/Tree/Fixture/ANode.php index fb3276145e..05789a9ca0 100644 --- a/tests/Gedmo/Tree/Fixture/ANode.php +++ b/tests/Gedmo/Tree/Fixture/ANode.php @@ -37,6 +37,7 @@ class ANode * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(type="integer", nullable=true) */ #[ORM\Column(type: Types::INTEGER, nullable: true)] @@ -47,6 +48,7 @@ class ANode * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(type="integer", nullable=true) */ #[ORM\Column(type: Types::INTEGER, nullable: true)] @@ -55,6 +57,7 @@ class ANode /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="BaseNode", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ diff --git a/tests/Gedmo/Tree/Fixture/BaseNode.php b/tests/Gedmo/Tree/Fixture/BaseNode.php index 0d361fddba..7b9bbac406 100644 --- a/tests/Gedmo/Tree/Fixture/BaseNode.php +++ b/tests/Gedmo/Tree/Fixture/BaseNode.php @@ -23,6 +23,7 @@ * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="discriminator", type="string") * @ORM\DiscriminatorMap({"base": "BaseNode", "node": "Node"}) + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -44,6 +45,7 @@ class BaseNode extends ANode * @var \DateTime|null * * @Gedmo\Timestampable(on="create") + * * @ORM\Column(type="datetime") */ #[ORM\Column(type: Types::DATETIME_MUTABLE)] @@ -60,6 +62,7 @@ class BaseNode extends ANode * @var \DateTime|null * * @ORM\Column(type="datetime") + * * @Gedmo\Timestampable */ #[ORM\Column(type: Types::DATETIME_MUTABLE)] diff --git a/tests/Gedmo/Tree/Fixture/BehavioralCategory.php b/tests/Gedmo/Tree/Fixture/BehavioralCategory.php index 210b428eea..c87f18ff86 100644 --- a/tests/Gedmo/Tree/Fixture/BehavioralCategory.php +++ b/tests/Gedmo/Tree/Fixture/BehavioralCategory.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tests\Tree\Fixture\Repository\BehavioralCategoryRepository") + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: BehavioralCategoryRepository::class)] @@ -40,6 +41,7 @@ class BehavioralCategory /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=64) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 64)] @@ -50,6 +52,7 @@ class BehavioralCategory * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer", nullable=true) */ #[ORM\Column(name: 'lft', type: Types::INTEGER, nullable: true)] @@ -60,6 +63,7 @@ class BehavioralCategory * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer", nullable=true) */ #[ORM\Column(name: 'rgt', type: Types::INTEGER, nullable: true)] @@ -68,6 +72,7 @@ class BehavioralCategory /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="BehavioralCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -91,6 +96,7 @@ class BehavioralCategory * * @Gedmo\Translatable * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(name="slug", type="string", length=128, unique=true) */ #[ORM\Column(name: 'slug', type: Types::STRING, length: 128, unique: true)] diff --git a/tests/Gedmo/Tree/Fixture/Category.php b/tests/Gedmo/Tree/Fixture/Category.php index fb413eb728..b8f3d6c4c4 100644 --- a/tests/Gedmo/Tree/Fixture/Category.php +++ b/tests/Gedmo/Tree/Fixture/Category.php @@ -21,6 +21,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -49,6 +50,7 @@ class Category implements NodeInterface * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -59,6 +61,7 @@ class Category implements NodeInterface * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -67,6 +70,7 @@ class Category implements NodeInterface /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -81,6 +85,7 @@ class Category implements NodeInterface * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/CategoryUuid.php b/tests/Gedmo/Tree/Fixture/CategoryUuid.php index a2e25cc329..e5e7bdd76c 100644 --- a/tests/Gedmo/Tree/Fixture/CategoryUuid.php +++ b/tests/Gedmo/Tree/Fixture/CategoryUuid.php @@ -21,7 +21,9 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") + * * @ORM\HasLifecycleCallbacks */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -49,6 +51,7 @@ class CategoryUuid implements NodeInterface * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -59,6 +62,7 @@ class CategoryUuid implements NodeInterface * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -67,6 +71,7 @@ class CategoryUuid implements NodeInterface /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="CategoryUuid", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -81,6 +86,7 @@ class CategoryUuid implements NodeInterface * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -91,6 +97,7 @@ class CategoryUuid implements NodeInterface * @var string|null * * @Gedmo\TreeRoot + * * @ORM\Column(name="root", type="string") */ #[ORM\Column(name: 'root', type: Types::STRING)] diff --git a/tests/Gedmo/Tree/Fixture/Closure/Category.php b/tests/Gedmo/Tree/Fixture/Closure/Category.php index 6fc515ef6e..d144c945f1 100644 --- a/tests/Gedmo/Tree/Fixture/Closure/Category.php +++ b/tests/Gedmo/Tree/Fixture/Closure/Category.php @@ -21,6 +21,7 @@ /** * @Gedmo\Tree(type="closure") * @Gedmo\TreeClosure(class="CategoryClosure") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\ClosureTreeRepository") */ #[ORM\Entity(repositoryClass: ClosureTreeRepository::class)] @@ -48,6 +49,7 @@ class Category /** * @ORM\Column(name="level", type="integer", nullable=true) + * * @Gedmo\TreeLevel */ #[ORM\Column(name: 'level', type: Types::INTEGER, nullable: true)] @@ -56,6 +58,7 @@ class Category /** * @Gedmo\TreeParent + * * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") */ diff --git a/tests/Gedmo/Tree/Fixture/Closure/CategoryWithoutLevel.php b/tests/Gedmo/Tree/Fixture/Closure/CategoryWithoutLevel.php index 745c528685..353dd64bd2 100644 --- a/tests/Gedmo/Tree/Fixture/Closure/CategoryWithoutLevel.php +++ b/tests/Gedmo/Tree/Fixture/Closure/CategoryWithoutLevel.php @@ -21,6 +21,7 @@ /** * @Gedmo\Tree(type="closure") * @Gedmo\TreeClosure(class="Gedmo\Tests\Tree\Fixture\Closure\CategoryWithoutLevelClosure") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\ClosureTreeRepository") */ #[ORM\Entity(repositoryClass: ClosureTreeRepository::class)] @@ -48,6 +49,7 @@ class CategoryWithoutLevel /** * @Gedmo\TreeParent + * * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") * @ORM\ManyToOne(targetEntity="CategoryWithoutLevel", inversedBy="children") */ diff --git a/tests/Gedmo/Tree/Fixture/Closure/Person.php b/tests/Gedmo/Tree/Fixture/Closure/Person.php index 0ea68cd906..bbcb9725f4 100644 --- a/tests/Gedmo/Tree/Fixture/Closure/Person.php +++ b/tests/Gedmo/Tree/Fixture/Closure/Person.php @@ -19,6 +19,7 @@ /** * @Gedmo\Tree(type="closure") * @Gedmo\TreeClosure(class="Gedmo\Tests\Tree\Fixture\Closure\PersonClosure") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\ClosureTreeRepository") * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discriminator", type="string") @@ -54,6 +55,7 @@ abstract class Person /** * @Gedmo\TreeParent + * * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") * @ORM\ManyToOne(targetEntity="Person", inversedBy="children", cascade={"persist"}) */ @@ -64,6 +66,7 @@ abstract class Person /** * @ORM\Column(name="level", type="integer") + * * @Gedmo\TreeLevel */ #[ORM\Column(name: 'level', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/Document/Article.php b/tests/Gedmo/Tree/Fixture/Document/Article.php index b64aa2d67a..465457b20f 100644 --- a/tests/Gedmo/Tree/Fixture/Document/Article.php +++ b/tests/Gedmo/Tree/Fixture/Document/Article.php @@ -18,6 +18,7 @@ /** * @Mongo\Document(repositoryClass="Gedmo\Tree\Document\MongoDB\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath", activateLocking=true) */ #[Mongo\Document(repositoryClass: MaterializedPathRepository::class)] @@ -34,6 +35,7 @@ class Article /** * @Mongo\Field(type="string") + * * @Gedmo\TreePathSource */ #[Mongo\Field(type: Type::STRING)] @@ -44,6 +46,7 @@ class Article * @var string|null * * @Mongo\Field(type="string") + * * @Gedmo\TreePath(separator="|") */ #[Mongo\Field(type: Type::STRING)] @@ -52,6 +55,7 @@ class Article /** * @Gedmo\TreeParent + * * @Mongo\ReferenceOne(targetDocument="Article") */ #[Mongo\ReferenceOne(targetDocument: self::class)] @@ -62,6 +66,7 @@ class Article * @var int|null * * @Gedmo\TreeLevel + * * @Mongo\Field(type="int") */ #[Mongo\Field(type: Type::INT)] @@ -72,6 +77,7 @@ class Article * @var \DateTime|null * * @Gedmo\TreeLockTime + * * @Mongo\Field(type="date") */ #[Mongo\Field(type: Type::DATE)] diff --git a/tests/Gedmo/Tree/Fixture/Document/Category.php b/tests/Gedmo/Tree/Fixture/Document/Category.php index 8deeca9596..707f9787e9 100644 --- a/tests/Gedmo/Tree/Fixture/Document/Category.php +++ b/tests/Gedmo/Tree/Fixture/Document/Category.php @@ -18,6 +18,7 @@ /** * @Mongo\Document(repositoryClass="Gedmo\Tree\Document\MongoDB\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath") */ #[Mongo\Document(repositoryClass: MaterializedPathRepository::class)] @@ -34,6 +35,7 @@ class Category /** * @Mongo\Field(type="string") + * * @Gedmo\TreePathSource */ #[Mongo\Field(type: Type::STRING)] @@ -44,6 +46,7 @@ class Category * @var string|null * * @Mongo\Field(type="string") + * * @Gedmo\TreePath(separator="|") */ #[Mongo\Field(type: Type::STRING)] @@ -52,6 +55,7 @@ class Category /** * @Gedmo\TreeParent + * * @Mongo\ReferenceOne(targetDocument="Gedmo\Tests\Tree\Fixture\Document\Category") */ #[Mongo\ReferenceOne(targetDocument: self::class)] @@ -62,6 +66,7 @@ class Category * @var int|null * * @Gedmo\TreeLevel + * * @Mongo\Field(type="int") */ #[Mongo\Field(type: Type::INT)] diff --git a/tests/Gedmo/Tree/Fixture/ForeignRootCategory.php b/tests/Gedmo/Tree/Fixture/ForeignRootCategory.php index ce8b925602..9d97146d8c 100644 --- a/tests/Gedmo/Tree/Fixture/ForeignRootCategory.php +++ b/tests/Gedmo/Tree/Fixture/ForeignRootCategory.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -48,6 +49,7 @@ class ForeignRootCategory * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -58,6 +60,7 @@ class ForeignRootCategory * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -66,6 +69,7 @@ class ForeignRootCategory /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="ForeignRootCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -80,6 +84,7 @@ class ForeignRootCategory * @var int|null * * @Gedmo\TreeRoot(identifierMethod="getRoot") + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -90,6 +95,7 @@ class ForeignRootCategory * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/Genealogy/Person.php b/tests/Gedmo/Tree/Fixture/Genealogy/Person.php index da8e75afd2..3582a7e531 100644 --- a/tests/Gedmo/Tree/Fixture/Genealogy/Person.php +++ b/tests/Gedmo/Tree/Fixture/Genealogy/Person.php @@ -24,6 +24,7 @@ * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"man": "Man", "woman": "Woman"}) + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -56,6 +57,7 @@ abstract class Person /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Person", inversedBy="children") */ #[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')] @@ -66,6 +68,7 @@ abstract class Person * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -76,6 +79,7 @@ abstract class Person * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -86,6 +90,7 @@ abstract class Person * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/Issue2408/Category.php b/tests/Gedmo/Tree/Fixture/Issue2408/Category.php index 3ae5cbe007..3328f03ff9 100644 --- a/tests/Gedmo/Tree/Fixture/Issue2408/Category.php +++ b/tests/Gedmo/Tree/Fixture/Issue2408/Category.php @@ -20,6 +20,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Table(name="categories") * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ @@ -50,6 +51,7 @@ class Category * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -60,6 +62,7 @@ class Category * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -70,6 +73,7 @@ class Category * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -80,6 +84,7 @@ class Category * @var self|null * * @Gedmo\TreeRoot + * * @ORM\ManyToOne(targetEntity="Category") * @ORM\JoinColumn(name="tree_root", referencedColumnName="id", onDelete="CASCADE") */ @@ -90,6 +95,7 @@ class Category /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ diff --git a/tests/Gedmo/Tree/Fixture/Issue2517/Category.php b/tests/Gedmo/Tree/Fixture/Issue2517/Category.php index 7e33fc37c8..50bb6db0ef 100644 --- a/tests/Gedmo/Tree/Fixture/Issue2517/Category.php +++ b/tests/Gedmo/Tree/Fixture/Issue2517/Category.php @@ -20,6 +20,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Table(name="categories") * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ @@ -50,6 +51,7 @@ class Category * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -60,6 +62,7 @@ class Category * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -70,6 +73,7 @@ class Category * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] @@ -80,6 +84,7 @@ class Category * @var self|null * * @Gedmo\TreeRoot + * * @ORM\ManyToOne(targetEntity="Category") * @ORM\JoinColumn(name="tree_root", referencedColumnName="id", onDelete="CASCADE") */ @@ -90,6 +95,7 @@ class Category /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") */ diff --git a/tests/Gedmo/Tree/Fixture/MPCategory.php b/tests/Gedmo/Tree/Fixture/MPCategory.php index 630ed443ce..e2f3485b1d 100644 --- a/tests/Gedmo/Tree/Fixture/MPCategory.php +++ b/tests/Gedmo/Tree/Fixture/MPCategory.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath") */ #[ORM\Entity(repositoryClass: MaterializedPathRepository::class)] @@ -40,6 +41,7 @@ class MPCategory /** * @Gedmo\TreePath + * * @ORM\Column(name="path", type="string", length=3000, nullable=true) */ #[ORM\Column(name: 'path', type: Types::STRING, length: 3000, nullable: true)] @@ -48,6 +50,7 @@ class MPCategory /** * @Gedmo\TreePathSource + * * @ORM\Column(name="title", type="string", length=64) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 64)] @@ -56,6 +59,7 @@ class MPCategory /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="MPCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -70,6 +74,7 @@ class MPCategory * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer", nullable=true) */ #[ORM\Column(name: 'lvl', type: Types::INTEGER, nullable: true)] @@ -80,6 +85,7 @@ class MPCategory * @var string|null * * @Gedmo\TreeRoot + * * @ORM\Column(name="tree_root_value", type="string", nullable=true) */ #[ORM\Column(name: 'tree_root_value', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Tree/Fixture/MPCategoryWithRootAssociation.php b/tests/Gedmo/Tree/Fixture/MPCategoryWithRootAssociation.php index 6447a6847f..e1dbb4e301 100644 --- a/tests/Gedmo/Tree/Fixture/MPCategoryWithRootAssociation.php +++ b/tests/Gedmo/Tree/Fixture/MPCategoryWithRootAssociation.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath") */ #[ORM\Entity(repositoryClass: MaterializedPathRepository::class)] @@ -30,6 +31,7 @@ class MPCategoryWithRootAssociation * @var int|null * * @Gedmo\TreePathSource + * * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") @@ -42,6 +44,7 @@ class MPCategoryWithRootAssociation /** * @Gedmo\TreePath + * * @ORM\Column(name="path", type="string", length=3000, nullable=true) */ #[ORM\Column(name: 'path', type: Types::STRING, length: 3000, nullable: true)] @@ -56,6 +59,7 @@ class MPCategoryWithRootAssociation /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="MPCategoryWithRootAssociation", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -70,6 +74,7 @@ class MPCategoryWithRootAssociation * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer", nullable=true) */ #[ORM\Column(name: 'lvl', type: Types::INTEGER, nullable: true)] @@ -80,6 +85,7 @@ class MPCategoryWithRootAssociation * @var self|null * * @Gedmo\TreeRoot + * * @ORM\ManyToOne(targetEntity="MPCategoryWithRootAssociation") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="tree_root_entity", referencedColumnName="id", onDelete="CASCADE") diff --git a/tests/Gedmo/Tree/Fixture/MPCategoryWithTrimmedSeparator.php b/tests/Gedmo/Tree/Fixture/MPCategoryWithTrimmedSeparator.php index 6d3073631f..27f9d811aa 100644 --- a/tests/Gedmo/Tree/Fixture/MPCategoryWithTrimmedSeparator.php +++ b/tests/Gedmo/Tree/Fixture/MPCategoryWithTrimmedSeparator.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath") */ #[ORM\Entity(repositoryClass: MaterializedPathRepository::class)] @@ -40,6 +41,7 @@ class MPCategoryWithTrimmedSeparator /** * @Gedmo\TreePath(appendId=false, startsWithSeparator=false, endsWithSeparator=false) + * * @ORM\Column(name="path", type="string", length=3000, nullable=true) */ #[ORM\Column(name: 'path', type: Types::STRING, length: 3000, nullable: true)] @@ -48,6 +50,7 @@ class MPCategoryWithTrimmedSeparator /** * @Gedmo\TreePathSource + * * @ORM\Column(name="title", type="string", length=64) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 64)] @@ -56,6 +59,7 @@ class MPCategoryWithTrimmedSeparator /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="MPCategoryWithTrimmedSeparator", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -70,6 +74,7 @@ class MPCategoryWithTrimmedSeparator * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer", nullable=true) */ #[ORM\Column(name: 'lvl', type: Types::INTEGER, nullable: true)] diff --git a/tests/Gedmo/Tree/Fixture/MPFeaturesCategory.php b/tests/Gedmo/Tree/Fixture/MPFeaturesCategory.php index 319647c274..a77aeb0826 100644 --- a/tests/Gedmo/Tree/Fixture/MPFeaturesCategory.php +++ b/tests/Gedmo/Tree/Fixture/MPFeaturesCategory.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\MaterializedPathRepository") + * * @Gedmo\Tree(type="materializedPath") */ #[ORM\Entity(repositoryClass: MaterializedPathRepository::class)] @@ -40,6 +41,7 @@ class MPFeaturesCategory /** * @Gedmo\TreePath(appendId=false, startsWithSeparator=true, endsWithSeparator=false) + * * @ORM\Column(name="path", type="string", length=3000, nullable=true) */ #[ORM\Column(name: 'path', type: Types::STRING, length: 3000, nullable: true)] @@ -50,6 +52,7 @@ class MPFeaturesCategory * @var string|null * * @Gedmo\TreePathHash + * * @ORM\Column(name="pathhash", type="string", length=32, nullable=true) */ #[ORM\Column(name: 'pathhash', type: Types::STRING, length: 32, nullable: true)] @@ -58,6 +61,7 @@ class MPFeaturesCategory /** * @Gedmo\TreePathSource + * * @ORM\Column(name="title", type="string", length=64) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 64)] @@ -66,6 +70,7 @@ class MPFeaturesCategory /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="MPFeaturesCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -80,6 +85,7 @@ class MPFeaturesCategory * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer", nullable=true) */ #[ORM\Column(name: 'lvl', type: Types::INTEGER, nullable: true)] @@ -90,6 +96,7 @@ class MPFeaturesCategory * @var string|null * * @Gedmo\TreeRoot + * * @ORM\Column(name="tree_root_value", type="string", nullable=true) */ #[ORM\Column(name: 'tree_root_value', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Tree/Fixture/Node.php b/tests/Gedmo/Tree/Fixture/Node.php index 1daf0ae329..a003c02627 100644 --- a/tests/Gedmo/Tree/Fixture/Node.php +++ b/tests/Gedmo/Tree/Fixture/Node.php @@ -24,6 +24,7 @@ class Node extends BaseNode { /** * @Gedmo\Translatable + * * @ORM\Column(name="title", type="string", length=64) */ #[ORM\Column(name: 'title', type: Types::STRING, length: 64)] @@ -35,6 +36,7 @@ class Node extends BaseNode * * @Gedmo\Translatable * @Gedmo\Slug(fields={"title"}) + * * @ORM\Column(name="slug", type="string", length=128) */ #[ORM\Column(name: 'slug', type: Types::STRING, length: 128)] diff --git a/tests/Gedmo/Tree/Fixture/Role.php b/tests/Gedmo/Tree/Fixture/Role.php index 1aeee5e1c9..ebad728ecf 100644 --- a/tests/Gedmo/Tree/Fixture/Role.php +++ b/tests/Gedmo/Tree/Fixture/Role.php @@ -24,6 +24,7 @@ * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"user": "User", "usergroup": "UserGroup", "userldap": "UserLDAP"}) + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -56,6 +57,7 @@ abstract class Role /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="UserGroup", inversedBy="children") */ #[ORM\ManyToOne(targetEntity: UserGroup::class, inversedBy: 'children')] @@ -66,6 +68,7 @@ abstract class Role * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -76,6 +79,7 @@ abstract class Role * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -86,6 +90,7 @@ abstract class Role * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/RootAssociationCategory.php b/tests/Gedmo/Tree/Fixture/RootAssociationCategory.php index 0208ee1f87..725a9d003a 100644 --- a/tests/Gedmo/Tree/Fixture/RootAssociationCategory.php +++ b/tests/Gedmo/Tree/Fixture/RootAssociationCategory.php @@ -20,6 +20,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -55,6 +56,7 @@ class RootAssociationCategory * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -65,6 +67,7 @@ class RootAssociationCategory * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -73,6 +76,7 @@ class RootAssociationCategory /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="RootAssociationCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -87,6 +91,7 @@ class RootAssociationCategory * @var self|null * * @Gedmo\TreeRoot + * * @ORM\ManyToOne(targetEntity="RootAssociationCategory") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="tree_root", referencedColumnName="id", onDelete="CASCADE") @@ -101,6 +106,7 @@ class RootAssociationCategory * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/RootCategory.php b/tests/Gedmo/Tree/Fixture/RootCategory.php index 9ad607102d..66ad141c85 100644 --- a/tests/Gedmo/Tree/Fixture/RootCategory.php +++ b/tests/Gedmo/Tree/Fixture/RootCategory.php @@ -21,6 +21,7 @@ /** * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * * @Gedmo\Tree(type="nested") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -56,6 +57,7 @@ class RootCategory implements Node * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(name="lft", type="integer") */ #[ORM\Column(name: 'lft', type: Types::INTEGER)] @@ -66,6 +68,7 @@ class RootCategory implements Node * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(name="rgt", type="integer") */ #[ORM\Column(name: 'rgt', type: Types::INTEGER)] @@ -74,6 +77,7 @@ class RootCategory implements Node /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="RootCategory", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -88,6 +92,7 @@ class RootCategory implements Node * @var int|null * * @Gedmo\TreeRoot + * * @ORM\Column(type="integer") */ #[ORM\Column(type: Types::INTEGER)] @@ -98,6 +103,7 @@ class RootCategory implements Node * @var int|null * * @Gedmo\TreeLevel(base=1) + * * @ORM\Column(name="lvl", type="integer") */ #[ORM\Column(name: 'lvl', type: Types::INTEGER)] diff --git a/tests/Gedmo/Tree/Fixture/Transport/Car.php b/tests/Gedmo/Tree/Fixture/Transport/Car.php index f4c89104f1..81c337b3ee 100644 --- a/tests/Gedmo/Tree/Fixture/Transport/Car.php +++ b/tests/Gedmo/Tree/Fixture/Transport/Car.php @@ -20,6 +20,7 @@ /** * @Gedmo\Tree(type="nested") + * * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ #[ORM\Entity(repositoryClass: NestedTreeRepository::class)] @@ -36,6 +37,7 @@ class Car extends Vehicle /** * @Gedmo\TreeParent + * * @ORM\ManyToOne(targetEntity="Car", inversedBy="children") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") @@ -50,6 +52,7 @@ class Car extends Vehicle * @var int|null * * @Gedmo\TreeLeft + * * @ORM\Column(type="integer", nullable=true) */ #[ORM\Column(type: Types::INTEGER, nullable: true)] @@ -60,6 +63,7 @@ class Car extends Vehicle * @var int|null * * @Gedmo\TreeRight + * * @ORM\Column(type="integer", nullable=true) */ #[ORM\Column(type: Types::INTEGER, nullable: true)] @@ -70,6 +74,7 @@ class Car extends Vehicle * @var int|null * * @Gedmo\TreeRoot + * * @ORM\Column(type="integer", nullable=true) */ #[ORM\Column(type: Types::INTEGER, nullable: true)] @@ -80,6 +85,7 @@ class Car extends Vehicle * @var int|null * * @Gedmo\TreeLevel + * * @ORM\Column(name="lvl", type="integer", nullable=true) */ #[ORM\Column(name: 'lvl', type: Types::INTEGER, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/File.php b/tests/Gedmo/Uploadable/Fixture/Entity/File.php index 56133df1a0..708cddb82a 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/File.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/File.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(allowOverwrite=true, pathMethod="getPath", callback="callbackMethod") */ #[ORM\Entity] @@ -48,6 +49,7 @@ class File /** * @ORM\Column(name="path", type="string") + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumber.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumber.php index 8bc94e8396..a9ab73d6b4 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumber.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumber.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(appendNumber=true, pathMethod="getPath") */ #[ORM\Entity] @@ -43,6 +44,7 @@ class FileAppendNumber /** * @ORM\Column(name="path", type="string") + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumberRelative.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumberRelative.php index 31f69bfac7..721869362c 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumberRelative.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileAppendNumberRelative.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(appendNumber=true, path="./", filenameGenerator="ALPHANUMERIC") */ #[ORM\Entity] @@ -44,6 +45,7 @@ class FileAppendNumberRelative /** * @ORM\Column(name="path", type="string") + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAllowedTypes.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAllowedTypes.php index 303babe66f..f08f67c65c 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAllowedTypes.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAllowedTypes.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(allowedTypes="text/plain,text/html") */ #[ORM\Entity] @@ -43,6 +44,7 @@ class FileWithAllowedTypes /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] @@ -51,6 +53,7 @@ class FileWithAllowedTypes /** * @ORM\Column(name="size", type="decimal", nullable=true) + * * @Gedmo\UploadableFileSize */ #[ORM\Column(name: 'size', type: Types::DECIMAL, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAlphanumericName.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAlphanumericName.php index 878b99132a..40ffede720 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAlphanumericName.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithAlphanumericName.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(pathMethod="getPath", filenameGenerator="ALPHANUMERIC", appendNumber=true) */ #[ORM\Entity] @@ -38,6 +39,7 @@ class FileWithAlphanumericName /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithCustomFilenameGenerator.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithCustomFilenameGenerator.php index 6ba6caee3d..043b3b1e9d 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithCustomFilenameGenerator.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithCustomFilenameGenerator.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(pathMethod="getPath", filenameGenerator="Gedmo\Tests\Uploadable\FakeFilenameGenerator") */ #[ORM\Entity] @@ -38,6 +39,7 @@ class FileWithCustomFilenameGenerator /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithDisallowedTypes.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithDisallowedTypes.php index 3ca2859b46..f71417fc9f 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithDisallowedTypes.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithDisallowedTypes.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(disallowedTypes="text/css, text/html") */ #[ORM\Entity] @@ -43,6 +44,7 @@ class FileWithDisallowedTypes /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] @@ -51,6 +53,7 @@ class FileWithDisallowedTypes /** * @ORM\Column(name="size", type="decimal", nullable=true) + * * @Gedmo\UploadableFileSize */ #[ORM\Column(name: 'size', type: Types::DECIMAL, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithMaxSize.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithMaxSize.php index fdca00166b..6905d4a62e 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithMaxSize.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithMaxSize.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(allowOverwrite=true, pathMethod="getPath", callback="callbackMethod", maxSize="2") */ #[ORM\Entity] @@ -48,6 +49,7 @@ class FileWithMaxSize /** * @ORM\Column(name="path", type="string") + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING)] @@ -56,6 +58,7 @@ class FileWithMaxSize /** * @ORM\Column(name="size", type="decimal") + * * @Gedmo\UploadableFileSize */ #[ORM\Column(name: 'size', type: Types::DECIMAL)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithSha1Name.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithSha1Name.php index b1a9984d4e..95b03ee790 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithSha1Name.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithSha1Name.php @@ -18,6 +18,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(pathMethod="getPath", filenameGenerator="SHA1") */ #[ORM\Entity] @@ -38,6 +39,7 @@ class FileWithSha1Name /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithoutPath.php b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithoutPath.php index d795089113..125ea9da36 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/FileWithoutPath.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/FileWithoutPath.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable */ #[ORM\Entity] @@ -37,6 +38,7 @@ class FileWithoutPath /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/Image.php b/tests/Gedmo/Uploadable/Fixture/Entity/Image.php index 12108563a7..1794687858 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/Image.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/Image.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(pathMethod="getPath") */ #[ORM\Entity] @@ -43,6 +44,7 @@ class Image /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] @@ -51,6 +53,7 @@ class Image /** * @ORM\Column(name="size", type="decimal", nullable=true) + * * @Gedmo\UploadableFileSize */ #[ORM\Column(name: 'size', type: Types::DECIMAL, nullable: true)] @@ -59,6 +62,7 @@ class Image /** * @ORM\Column(name="mime_type", type="string", nullable=true) + * * @Gedmo\UploadableFileMimeType */ #[ORM\Column(name: 'mime_type', type: Types::STRING, nullable: true)] diff --git a/tests/Gedmo/Uploadable/Fixture/Entity/ImageWithTypedProperties.php b/tests/Gedmo/Uploadable/Fixture/Entity/ImageWithTypedProperties.php index 6919de6077..b5d6a8a4fe 100644 --- a/tests/Gedmo/Uploadable/Fixture/Entity/ImageWithTypedProperties.php +++ b/tests/Gedmo/Uploadable/Fixture/Entity/ImageWithTypedProperties.php @@ -17,6 +17,7 @@ /** * @ORM\Entity + * * @Gedmo\Uploadable(pathMethod="getPath") */ #[ORM\Entity] @@ -41,6 +42,7 @@ class ImageWithTypedProperties /** * @ORM\Column(name="path", type="string", nullable=true) + * * @Gedmo\UploadableFilePath */ #[ORM\Column(name: 'path', type: Types::STRING, nullable: true)] @@ -49,6 +51,7 @@ class ImageWithTypedProperties /** * @ORM\Column(name="size", type="decimal", nullable=true) + * * @Gedmo\UploadableFileSize */ #[ORM\Column(name: 'size', type: Types::DECIMAL, nullable: true)] @@ -57,6 +60,7 @@ class ImageWithTypedProperties /** * @ORM\Column(name="mime_type", type="string", nullable=true) + * * @Gedmo\UploadableFileMimeType */ #[ORM\Column(name: 'mime_type', type: Types::STRING, nullable: true)]