From 803993ba4eca454590d338be1878b1669a281bfb Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 18:24:01 +0400 Subject: [PATCH 1/9] Cover relations --- .gitattributes | 1 + resources/annotated.meta-storm.xml | 45 ++++++++++ resources/orm.meta-storm.xml | 17 ++++ resources/relations.meta-storm.xml | 127 +++++++++++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 resources/annotated.meta-storm.xml create mode 100644 resources/orm.meta-storm.xml create mode 100644 resources/relations.meta-storm.xml diff --git a/.gitattributes b/.gitattributes index 7a91380d..9b02f3d4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,3 +4,4 @@ /*.yml export-ignore /*.lock export-ignore /*.dist export-ignore +/.meta-storm.xml -export-ignore diff --git a/resources/annotated.meta-storm.xml b/resources/annotated.meta-storm.xml new file mode 100644 index 00000000..ff07231a --- /dev/null +++ b/resources/annotated.meta-storm.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + diff --git a/resources/orm.meta-storm.xml b/resources/orm.meta-storm.xml new file mode 100644 index 00000000..79c6603e --- /dev/null +++ b/resources/orm.meta-storm.xml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/resources/relations.meta-storm.xml b/resources/relations.meta-storm.xml new file mode 100644 index 00000000..614255c4 --- /dev/null +++ b/resources/relations.meta-storm.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5cf5d1b1b5e43e10b90a68869c5440cd5b9ead0b Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 18:30:39 +0400 Subject: [PATCH 2/9] Separate collections and definitions --- resources/annotated.meta-storm.xml | 15 --------------- resources/collections.meta-storm.xml | 22 ++++++++++++++++++++++ src/Annotation/Entity.php | 13 +++++++++---- 3 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 resources/collections.meta-storm.xml diff --git a/resources/annotated.meta-storm.xml b/resources/annotated.meta-storm.xml index ff07231a..69716b53 100644 --- a/resources/annotated.meta-storm.xml +++ b/resources/annotated.meta-storm.xml @@ -27,19 +27,4 @@ collectionName="entity-role" /> - - - - - diff --git a/resources/collections.meta-storm.xml b/resources/collections.meta-storm.xml new file mode 100644 index 00000000..d3a629cd --- /dev/null +++ b/resources/collections.meta-storm.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/src/Annotation/Entity.php b/src/Annotation/Entity.php index 0e34d188..9e7a4cbd 100644 --- a/src/Annotation/Entity.php +++ b/src/Annotation/Entity.php @@ -4,6 +4,10 @@ namespace Cycle\Annotated\Annotation; +use Cycle\ORM\MapperInterface as Mapper; +use Cycle\ORM\RepositoryInterface as Repository; +use Cycle\ORM\Select\ScopeInterface as Scope; +use Cycle\ORM\Select\SourceInterface as Source; use Doctrine\Common\Annotations\Annotation\Target; use Spiral\Attributes\NamedArgumentConstructor; @@ -17,15 +21,16 @@ class Entity { /** * @param non-empty-string|null $role Entity role. Defaults to the lowercase class name without a namespace. - * @param class-string|null $mapper Mapper class name. Defaults to {@see \Cycle\ORM\Mapper\Mapper} - * @param class-string|null $repository Repository class to represent read operations for an entity. + * @param class-string|null $mapper Mapper class name. Defaults to {@see \Cycle\ORM\Mapper\Mapper} + * @param class-string|null $repository Repository class to represent read operations for an entity. * Defaults to {@see \Cycle\ORM\Select\Repository} * @param non-empty-string|null $table Entity source table. Defaults to plural form of entity role. * @param bool $readonlySchema Set to true to disable schema synchronization for the assigned table. * @param non-empty-string|null $database Database name. Defaults to null (default database). - * @param class-string|null $source Entity source class (internal). Defaults to {@see \Cycle\ORM\Select\Source} + * @param class-string|null $source Entity source class (internal). + * Defaults to {@see \Cycle\ORM\Select\Source} * @param non-empty-string|non-empty-string[]|null $typecast - * @param class-string|null $scope Class name of constraint to be applied to every entity query. + * @param class-string|null $scope Class name of constraint to be applied to every entity query. * @param Column[] $columns Entity columns. * @param ForeignKey[] $foreignKeys Entity foreign keys. */ From d7d08d766bd261c2038d72a46904d9e8598bc2b8 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 18:57:05 +0400 Subject: [PATCH 3/9] Cover ORM interface --- psalm.xml | 1 + resources/orm.meta-storm.xml | 104 +++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) diff --git a/psalm.xml b/psalm.xml index 6702d9ec..01d83cc0 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,6 +5,7 @@ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="psalm-baseline.xml" errorLevel="1" + findUnusedBaselineEntry="true" > diff --git a/resources/orm.meta-storm.xml b/resources/orm.meta-storm.xml index 79c6603e..7335f78a 100644 --- a/resources/orm.meta-storm.xml +++ b/resources/orm.meta-storm.xml @@ -13,5 +13,109 @@ argumentIndex="1" collectionName="entity-role" /> + + + + + + + + + + + + + + + + + + + + + + + + From 22798f3f35884e32b9092efd54348d68b92c9278 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 20:02:16 +0400 Subject: [PATCH 4/9] Cover ORM Iterator --- resources/orm-iterator.meta-storm.xml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 resources/orm-iterator.meta-storm.xml diff --git a/resources/orm-iterator.meta-storm.xml b/resources/orm-iterator.meta-storm.xml new file mode 100644 index 00000000..865903a5 --- /dev/null +++ b/resources/orm-iterator.meta-storm.xml @@ -0,0 +1,30 @@ + + + + + + + + + + From 05ecc752d2f2c821176733b79121428884029e21 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 20:05:32 +0400 Subject: [PATCH 5/9] Cover ORM Factory --- resources/orm-factory.meta-storm.xml | 82 ++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 resources/orm-factory.meta-storm.xml diff --git a/resources/orm-factory.meta-storm.xml b/resources/orm-factory.meta-storm.xml new file mode 100644 index 00000000..50f2685b --- /dev/null +++ b/resources/orm-factory.meta-storm.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + From 8837719059b339a650632a1506cdb117dabc0f54 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 20:10:49 +0400 Subject: [PATCH 6/9] Cover ORM Schema --- resources/orm-schema.meta-storm.xml | 82 +++++++++++++++++++++++++++++ resources/orm.meta-storm.xml | 13 +++++ 2 files changed, 95 insertions(+) create mode 100644 resources/orm-schema.meta-storm.xml diff --git a/resources/orm-schema.meta-storm.xml b/resources/orm-schema.meta-storm.xml new file mode 100644 index 00000000..918a88ee --- /dev/null +++ b/resources/orm-schema.meta-storm.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/orm.meta-storm.xml b/resources/orm.meta-storm.xml index 7335f78a..49f90588 100644 --- a/resources/orm.meta-storm.xml +++ b/resources/orm.meta-storm.xml @@ -1,6 +1,19 @@ + + + Date: Thu, 26 Dec 2024 20:19:02 +0400 Subject: [PATCH 7/9] Cover other services --- resources/orm-services.meta-storm.xml | 121 ++++++++++++++++++++++++++ resources/orm.meta-storm.xml | 99 +-------------------- 2 files changed, 125 insertions(+), 95 deletions(-) create mode 100644 resources/orm-services.meta-storm.xml diff --git a/resources/orm-services.meta-storm.xml b/resources/orm-services.meta-storm.xml new file mode 100644 index 00000000..263a1031 --- /dev/null +++ b/resources/orm-services.meta-storm.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/orm.meta-storm.xml b/resources/orm.meta-storm.xml index 49f90588..9bb7ad52 100644 --- a/resources/orm.meta-storm.xml +++ b/resources/orm.meta-storm.xml @@ -28,105 +28,14 @@ /> - - - - - - - - - - - - - - - - - - - - - From 15fe41329bffed73df4b3437690600b0cecd0f4c Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Dec 2024 20:23:44 +0400 Subject: [PATCH 8/9] Cleanup --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 9b02f3d4..7a91380d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,4 +4,3 @@ /*.yml export-ignore /*.lock export-ignore /*.dist export-ignore -/.meta-storm.xml -export-ignore From 0f005e30f5ac7e0497310c158b9a6fe3c3544fa6 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 27 Dec 2024 12:11:44 +0400 Subject: [PATCH 9/9] Add Cycle project icon --- .idea/icon.svg | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .idea/icon.svg diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 00000000..1174bb0b --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +