From bfe834416d64550dd60cbd3dcafd463e61aac357 Mon Sep 17 00:00:00 2001 From: roadiz-ci Date: Thu, 13 Jun 2024 14:25:36 +0000 Subject: [PATCH] chore: Bumped --- .github/workflows/run-test.yml | 2 +- .travis.yml | 17 ----------------- composer.json | 10 +++++----- src/{Roadiz => }/Bag/LazyParameterBag.php | 0 .../Core/AbstractEntities/AbstractDateTimed.php | 0 .../AbstractDateTimedPositioned.php | 7 ++++++- .../Core/AbstractEntities/AbstractEntity.php | 0 .../Core/AbstractEntities/AbstractField.php | 10 +++++----- .../Core/AbstractEntities/AbstractHuman.php | 16 ++++++++-------- .../AbstractEntities/AbstractPositioned.php | 0 .../Core/AbstractEntities/LeafInterface.php | 0 .../Core/AbstractEntities/LeafTrait.php | 0 .../AbstractEntities/PersistableInterface.php | 0 .../AbstractEntities/PositionedInterface.php | 0 .../Core/AbstractEntities/PositionedTrait.php | 0 .../AbstractEntities/TranslationInterface.php | 0 .../Events/LeafEntityLifeCycleSubscriber.php | 0 .../Core/Handlers/AbstractHandler.php | 0 .../Core/Handlers/HandlerFactoryInterface.php | 0 src/{Roadiz => }/Utils/StringHandler.php | 0 20 files changed, 25 insertions(+), 37 deletions(-) delete mode 100644 .travis.yml rename src/{Roadiz => }/Bag/LazyParameterBag.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractDateTimed.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractDateTimedPositioned.php (75%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractEntity.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractField.php (98%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractHuman.php (90%) rename src/{Roadiz => }/Core/AbstractEntities/AbstractPositioned.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/LeafInterface.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/LeafTrait.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/PersistableInterface.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/PositionedInterface.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/PositionedTrait.php (100%) rename src/{Roadiz => }/Core/AbstractEntities/TranslationInterface.php (100%) rename src/{Roadiz => }/Core/Events/LeafEntityLifeCycleSubscriber.php (100%) rename src/{Roadiz => }/Core/Handlers/AbstractHandler.php (100%) rename src/{Roadiz => }/Core/Handlers/HandlerFactoryInterface.php (100%) rename src/{Roadiz => }/Utils/StringHandler.php (100%) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 6539dde..3e70a87 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.0', '8.1'] + php-version: ['8.1', '8.2', '8.3'] steps: - uses: shivammathur/setup-php@v2 with: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 56b6cd5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: php -sudo: required -php: - - 7.4 - - 8.0 - - 8.1 - - nightly -install: - - curl -s http://getcomposer.org/installer | php - - php composer.phar install --dev --no-interaction -script: - - vendor/bin/phpunit -v --bootstrap=tests/bootstrap.php --whitelist ./src --coverage-clover ./build/logs/clover.xml tests/ - - vendor/bin/phpcs --report=full --report-file=./report.txt -p ./src - - vendor/bin/phpstan analyse -c phpstan.neon -jobs: - allow_failures: - - php: nightly diff --git a/composer.json b/composer.json index 963454f..780e31a 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ } ], "require": { - "php": ">=8.0", - "doctrine/orm": "<2.17", + "php": ">=8.1", + "doctrine/orm": "~2.17.0", "jms/serializer": "^3.9.0", "symfony/string": "5.4.*", "symfony/translation-contracts": "^2.3", @@ -35,7 +35,7 @@ }, "autoload": { "psr-4": { - "RZ\\": "src/" + "RZ\\Roadiz\\": "src/" } }, "config": { @@ -46,8 +46,8 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev" + "dev-master": "2.2.x-dev", + "dev-develop": "2.3.x-dev" } } } diff --git a/src/Roadiz/Bag/LazyParameterBag.php b/src/Bag/LazyParameterBag.php similarity index 100% rename from src/Roadiz/Bag/LazyParameterBag.php rename to src/Bag/LazyParameterBag.php diff --git a/src/Roadiz/Core/AbstractEntities/AbstractDateTimed.php b/src/Core/AbstractEntities/AbstractDateTimed.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/AbstractDateTimed.php rename to src/Core/AbstractEntities/AbstractDateTimed.php diff --git a/src/Roadiz/Core/AbstractEntities/AbstractDateTimedPositioned.php b/src/Core/AbstractEntities/AbstractDateTimedPositioned.php similarity index 75% rename from src/Roadiz/Core/AbstractEntities/AbstractDateTimedPositioned.php rename to src/Core/AbstractEntities/AbstractDateTimedPositioned.php index bcee85e..afb2623 100644 --- a/src/Roadiz/Core/AbstractEntities/AbstractDateTimedPositioned.php +++ b/src/Core/AbstractEntities/AbstractDateTimedPositioned.php @@ -4,10 +4,13 @@ namespace RZ\Roadiz\Core\AbstractEntities; +use ApiPlatform\Doctrine\Orm\Filter\NumericFilter; +use ApiPlatform\Metadata\ApiFilter; use Doctrine\Common\Comparable; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as SymfonySerializer; +use ApiPlatform\Doctrine\Orm\Filter\RangeFilter; /** * Combined AbstractDateTimed and PositionedTrait. @@ -28,7 +31,9 @@ abstract class AbstractDateTimedPositioned extends AbstractDateTimed implements ORM\Column(type: "float"), Serializer\Groups(["position"]), Serializer\Type("float"), - SymfonySerializer\Groups(["position"]) + SymfonySerializer\Groups(["position"]), + ApiFilter(RangeFilter::class), + ApiFilter(NumericFilter::class) ] protected float $position = 0.0; } diff --git a/src/Roadiz/Core/AbstractEntities/AbstractEntity.php b/src/Core/AbstractEntities/AbstractEntity.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/AbstractEntity.php rename to src/Core/AbstractEntities/AbstractEntity.php diff --git a/src/Roadiz/Core/AbstractEntities/AbstractField.php b/src/Core/AbstractEntities/AbstractField.php similarity index 98% rename from src/Roadiz/Core/AbstractEntities/AbstractField.php rename to src/Core/AbstractEntities/AbstractField.php index 737baf3..ba5c48b 100644 --- a/src/Roadiz/Core/AbstractEntities/AbstractField.php +++ b/src/Core/AbstractEntities/AbstractField.php @@ -255,7 +255,7 @@ abstract class AbstractField extends AbstractPositioned ]; #[ - ORM\Column(name: "group_name", type: "string", nullable: true), + ORM\Column(name: "group_name", type: "string", length: 250, nullable: true), Assert\Length(max: 250), SymfonySerializer\Groups(["node_type", "setting"]), Serializer\Groups(["node_type", "setting"]), @@ -265,7 +265,7 @@ abstract class AbstractField extends AbstractPositioned protected ?string $groupName = null; #[ - ORM\Column(name: "group_name_canonical", type: "string", nullable: true), + ORM\Column(name: "group_name_canonical", type: "string", length: 250, nullable: true), Serializer\Groups(["node_type", "setting"]), SymfonySerializer\Groups(["node_type", "setting"]), Assert\Length(max: 250), @@ -275,7 +275,7 @@ abstract class AbstractField extends AbstractPositioned protected ?string $groupNameCanonical = null; #[ - ORM\Column(type: "string"), + ORM\Column(type: "string", length: 250), Serializer\Expose, Serializer\Groups(["node_type", "setting"]), SymfonySerializer\Groups(["node_type", "setting"]), @@ -287,7 +287,7 @@ abstract class AbstractField extends AbstractPositioned protected string $name; #[ - ORM\Column(type: "string"), + ORM\Column(type: "string", length: 250), Serializer\Expose, Serializer\Groups(["node_type", "setting"]), Serializer\Type("string"), @@ -299,7 +299,7 @@ abstract class AbstractField extends AbstractPositioned protected ?string $label; #[ - ORM\Column(type: "string", nullable: true), + ORM\Column(type: "string", length: 250, nullable: true), Serializer\Expose, Serializer\Groups(["node_type", "setting"]), SymfonySerializer\Groups(["node_type", "setting"]), diff --git a/src/Roadiz/Core/AbstractEntities/AbstractHuman.php b/src/Core/AbstractEntities/AbstractHuman.php similarity index 90% rename from src/Roadiz/Core/AbstractEntities/AbstractHuman.php rename to src/Core/AbstractEntities/AbstractHuman.php index 9e8fd69..72725d7 100644 --- a/src/Roadiz/Core/AbstractEntities/AbstractHuman.php +++ b/src/Core/AbstractEntities/AbstractHuman.php @@ -23,7 +23,7 @@ abstract class AbstractHuman extends AbstractDateTimed { #[ - ORM\Column(type: "string", unique: true), + ORM\Column(type: "string", length: 200, unique: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), Assert\NotNull(), @@ -37,7 +37,7 @@ abstract class AbstractHuman extends AbstractDateTimed * Public name (pseudonyme) that can be displayed to a public audience. */ #[ - ORM\Column(name: "publicName", type: "string", nullable: true), + ORM\Column(name: "publicName", type: "string", length: 250, nullable: true), Serializer\Groups(["user_public", "human"]), SymfonySerializer\Groups(["user_public", "human"]), Assert\Length(max: 250) @@ -45,7 +45,7 @@ abstract class AbstractHuman extends AbstractDateTimed protected ?string $publicName = null; #[ - ORM\Column(name: "firstName", type: "string", nullable: true), + ORM\Column(name: "firstName", type: "string", length: 250, nullable: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), Assert\Length(max: 250) @@ -53,7 +53,7 @@ abstract class AbstractHuman extends AbstractDateTimed protected ?string $firstName = null; #[ - ORM\Column(name: "lastName", type: "string", nullable: true), + ORM\Column(name: "lastName", type: "string", length: 250, nullable: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), Assert\Length(max: 250) @@ -61,15 +61,15 @@ abstract class AbstractHuman extends AbstractDateTimed protected ?string $lastName = null; #[ - ORM\Column(type: "string", nullable: true), + ORM\Column(type: "string", length: 50, nullable: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), - Assert\Length(max: 20) + Assert\Length(max: 50) ] protected ?string $phone = null; #[ - ORM\Column(type: "string", nullable: true), + ORM\Column(type: "string", length: 250, nullable: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), Assert\Length(max: 250) @@ -77,7 +77,7 @@ abstract class AbstractHuman extends AbstractDateTimed protected ?string $company = null; #[ - ORM\Column(type: "string", nullable: true), + ORM\Column(type: "string", length: 250, nullable: true), Serializer\Groups(["user_personal", "human"]), SymfonySerializer\Groups(["user_personal", "human"]), Assert\Length(max: 250) diff --git a/src/Roadiz/Core/AbstractEntities/AbstractPositioned.php b/src/Core/AbstractEntities/AbstractPositioned.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/AbstractPositioned.php rename to src/Core/AbstractEntities/AbstractPositioned.php diff --git a/src/Roadiz/Core/AbstractEntities/LeafInterface.php b/src/Core/AbstractEntities/LeafInterface.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/LeafInterface.php rename to src/Core/AbstractEntities/LeafInterface.php diff --git a/src/Roadiz/Core/AbstractEntities/LeafTrait.php b/src/Core/AbstractEntities/LeafTrait.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/LeafTrait.php rename to src/Core/AbstractEntities/LeafTrait.php diff --git a/src/Roadiz/Core/AbstractEntities/PersistableInterface.php b/src/Core/AbstractEntities/PersistableInterface.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/PersistableInterface.php rename to src/Core/AbstractEntities/PersistableInterface.php diff --git a/src/Roadiz/Core/AbstractEntities/PositionedInterface.php b/src/Core/AbstractEntities/PositionedInterface.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/PositionedInterface.php rename to src/Core/AbstractEntities/PositionedInterface.php diff --git a/src/Roadiz/Core/AbstractEntities/PositionedTrait.php b/src/Core/AbstractEntities/PositionedTrait.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/PositionedTrait.php rename to src/Core/AbstractEntities/PositionedTrait.php diff --git a/src/Roadiz/Core/AbstractEntities/TranslationInterface.php b/src/Core/AbstractEntities/TranslationInterface.php similarity index 100% rename from src/Roadiz/Core/AbstractEntities/TranslationInterface.php rename to src/Core/AbstractEntities/TranslationInterface.php diff --git a/src/Roadiz/Core/Events/LeafEntityLifeCycleSubscriber.php b/src/Core/Events/LeafEntityLifeCycleSubscriber.php similarity index 100% rename from src/Roadiz/Core/Events/LeafEntityLifeCycleSubscriber.php rename to src/Core/Events/LeafEntityLifeCycleSubscriber.php diff --git a/src/Roadiz/Core/Handlers/AbstractHandler.php b/src/Core/Handlers/AbstractHandler.php similarity index 100% rename from src/Roadiz/Core/Handlers/AbstractHandler.php rename to src/Core/Handlers/AbstractHandler.php diff --git a/src/Roadiz/Core/Handlers/HandlerFactoryInterface.php b/src/Core/Handlers/HandlerFactoryInterface.php similarity index 100% rename from src/Roadiz/Core/Handlers/HandlerFactoryInterface.php rename to src/Core/Handlers/HandlerFactoryInterface.php diff --git a/src/Roadiz/Utils/StringHandler.php b/src/Utils/StringHandler.php similarity index 100% rename from src/Roadiz/Utils/StringHandler.php rename to src/Utils/StringHandler.php