diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index 161c3100..cce4658e 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -30,9 +30,11 @@ runs: run: | composer require --quiet --no-update "symfony/console:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/framework-bundle:${{ inputs.symfony-version }}" + composer require --quiet --no-update "symfony/routing:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/messenger:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/process:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/serializer:${{ inputs.symfony-version }}" + composer require --quiet --no-update "symfony/property-info:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/validator:${{ inputs.symfony-version }}" composer require --quiet --no-update "symfony/filesystem:${{ inputs.symfony-version }}" --dev composer require --quiet --no-update "symfony/finder:${{ inputs.symfony-version }}" --dev diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 333bab25..717a03b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,9 +18,9 @@ jobs: - php-version: '8.4' symfony-version: '6.4.*' - php-version: '8.2' - symfony-version: '7.3.*' + symfony-version: '7.4.*' - php-version: '8.4' - symfony-version: '7.3.*' + symfony-version: '7.4.*' steps: - name: "Checkout" uses: actions/checkout@v2 @@ -42,7 +42,7 @@ jobs: uses: ./.github/actions/install with: php-version: '8.4' - symfony-version: '7.3.*' + symfony-version: '7.4.*' - name: "Run static analyzis with phpstan/phpstan" run: vendor/bin/phpstan analyze @@ -56,7 +56,7 @@ jobs: uses: ./.github/actions/install with: php-version: '8.4' - symfony-version: '7.3.*' + symfony-version: '7.4.*' - name: "Run checkstyle with symplify/easy-coding-standard" run: vendor/bin/ecs @@ -70,7 +70,7 @@ jobs: uses: ./.github/actions/install with: php-version: '8.4' - symfony-version: '7.3.*' + symfony-version: '7.4.*' - name: "Run tests with phpunit/phpunit" run: vendor/bin/phpunit --testsuite=Convention @@ -85,7 +85,7 @@ jobs: uses: ./.github/actions/install with: php-version: '8.4' - symfony-version: '7.3.*' + symfony-version: '7.4.*' coverage-mode: 'xdebug' - name: "Run tests with phpunit/phpunit" run: | diff --git a/docker-compose.yml b/docker-compose.yml index 08d90384..b750ce5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,21 @@ services: + php84: + container_name: yokai-batch-php84 + extends: + file: $HOME/.led/docker-base.yaml + service: localuser + hostname: php84 + image: ledup/php:8.4-rl9 + volumes: + - .:/src + working_dir: /src php83: container_name: yokai-batch-php83 extends: file: $HOME/.led/docker-base.yaml service: localuser hostname: php83 - image: ledup/php:8.3 + image: ledup/php:8.3-rl9 volumes: - .:/src working_dir: /src @@ -15,7 +25,7 @@ services: file: $HOME/.led/docker-base.yaml service: localuser hostname: php82 - image: ledup/php:8.2 + image: ledup/php:8.2-rl9 volumes: - .:/src working_dir: /src @@ -25,7 +35,7 @@ services: file: $HOME/.led/docker-base.yaml service: localuser hostname: php81 - image: ledup/php:8.1 + image: ledup/php:8.1-rl9 volumes: - .:/src working_dir: /src diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 40dd838c..4ae48ab6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -160,11 +160,6 @@ parameters: count: 1 path: src/batch-openspout/src/Writer/FlatFileWriter.php - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/batch-symfony-framework/src/DependencyInjection/Configuration.php - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 3 diff --git a/phpstan.neon b/phpstan.neon index bc3a5454..1c6f6faf 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -15,8 +15,3 @@ parameters: - src/batch-symfony-messenger/src/ - src/batch-symfony-serializer/src/ - src/batch-symfony-validator/src/ - - ignoreErrors: - # The DependencyInjection returns are complex to deal with - - message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\:\:#' - path: ./src/batch-symfony-framework/src/DependencyInjection/Configuration.php diff --git a/src/batch-symfony-framework/tests/UserInterface/Controller/JobControllerTest.php b/src/batch-symfony-framework/tests/UserInterface/Controller/JobControllerTest.php index 0f32d1db..c1f2d8e3 100644 --- a/src/batch-symfony-framework/tests/UserInterface/Controller/JobControllerTest.php +++ b/src/batch-symfony-framework/tests/UserInterface/Controller/JobControllerTest.php @@ -26,6 +26,7 @@ use Symfony\Component\Routing\Generator\UrlGenerator; use Symfony\Component\Routing\Loader\XmlFileLoader; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Security\Core\Authorization\AccessDecision; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Component\Security\Csrf\CsrfTokenManager; @@ -418,8 +419,11 @@ public function __construct(private bool $granted) { } - public function isGranted(mixed $attribute, mixed $subject = null): bool - { + public function isGranted( + mixed $attribute, + mixed $subject = null, + AccessDecision|null $accessDecision = null, + ): bool { return $this->granted; } }, diff --git a/src/batch-symfony-framework/tests/UserInterface/JobSecurityTest.php b/src/batch-symfony-framework/tests/UserInterface/JobSecurityTest.php index cc753cdb..7c16f147 100644 --- a/src/batch-symfony-framework/tests/UserInterface/JobSecurityTest.php +++ b/src/batch-symfony-framework/tests/UserInterface/JobSecurityTest.php @@ -5,6 +5,7 @@ namespace Yokai\Batch\Tests\Bridge\Symfony\Framework\UserInterface; use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\AccessDecision; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Yokai\Batch\Bridge\Symfony\Framework\UserInterface\JobSecurity; @@ -39,8 +40,11 @@ public function __construct(private array $attributes) { } - public function isGranted(mixed $attribute, mixed $subject = null): bool - { + public function isGranted( + mixed $attribute, + mixed $subject = null, + AccessDecision|null $accessDecision = null, + ): bool { return \in_array($attribute, $this->attributes, true) && ($subject === null || $subject instanceof JobExecution); } diff --git a/src/batch-symfony-framework/tests/UserInterface/TwigExtensionTest.php b/src/batch-symfony-framework/tests/UserInterface/TwigExtensionTest.php index 075f80af..cdcdc10b 100644 --- a/src/batch-symfony-framework/tests/UserInterface/TwigExtensionTest.php +++ b/src/batch-symfony-framework/tests/UserInterface/TwigExtensionTest.php @@ -5,6 +5,7 @@ namespace Yokai\Batch\Tests\Bridge\Symfony\Framework\UserInterface; use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\AccessDecision; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Twig\Environment; use Twig\Loader\ArrayLoader; @@ -44,8 +45,11 @@ public function __construct(private bool $granted) { } - public function isGranted(mixed $attribute, mixed $subject = null): bool - { + public function isGranted( + mixed $attribute, + mixed $subject = null, + AccessDecision|null $accessDecision = null, + ): bool { return $this->granted; } }, diff --git a/src/batch-symfony-uid/tests/Factory/TimeBasedUuidJobExecutionIdGeneratorTest.php b/src/batch-symfony-uid/tests/Factory/TimeBasedUuidJobExecutionIdGeneratorTest.php index 5c0edaaa..048d5f05 100644 --- a/src/batch-symfony-uid/tests/Factory/TimeBasedUuidJobExecutionIdGeneratorTest.php +++ b/src/batch-symfony-uid/tests/Factory/TimeBasedUuidJobExecutionIdGeneratorTest.php @@ -7,6 +7,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Uid\Factory\UuidFactory; use Symfony\Component\Uid\UuidV6; +use Symfony\Component\Uid\UuidV7; use Yokai\Batch\Bridge\Symfony\Uid\Factory\TimeBasedUuidJobExecutionIdGenerator; final class TimeBasedUuidJobExecutionIdGeneratorTest extends TestCase @@ -15,6 +16,6 @@ public function testGenerate(): void { $id = (new TimeBasedUuidJobExecutionIdGenerator(new UuidFactory()))->generate(); - self::assertTrue(UuidV6::isValid($id)); + self::assertTrue(UuidV7::isValid($id) || UuidV6::isValid($id)); } }