From e721f6835ab8ad8d8b7b73beecaa9137f9a7d31b Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 30 Nov 2023 10:45:27 +0100 Subject: [PATCH 1/6] Lock action-contracts to avoid argument error on Kiboko\Component\Runtime\Action\Console class ($state argument) --- composer.json | 3 ++- composer.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c6d8fd24..8ab00864 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,8 @@ "php-etl/dockerfile": "*", "php-etl/pipeline": "*", "php-etl/workflow-console-runtime": "*", - "composer/composer": "*" + "composer/composer": "*", + "php-etl/action-contracts": "0.1.*" }, "require-dev": { "phpunit/phpunit": "^10.0", diff --git a/composer.lock b/composer.lock index 6aa60a85..6c3a3a5e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d3f473f2042c075fd26aed71995f9c47", + "content-hash": "3ccc9fefcb6d09d8ac890145392fa51f", "packages": [ { "name": "clue/stream-filter", From 8bd06680b126053c8b4c676bbc6aefe47559a556 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 30 Nov 2023 14:15:12 +0100 Subject: [PATCH 2/6] Remove the lock on action-contracts and lock workflow-console-runtime instead --- composer.json | 5 ++--- composer.lock | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 8ab00864..1b991eb1 100644 --- a/composer.json +++ b/composer.json @@ -37,9 +37,8 @@ "php-etl/gyroscops-api-client": "*", "php-etl/dockerfile": "*", "php-etl/pipeline": "*", - "php-etl/workflow-console-runtime": "*", - "composer/composer": "*", - "php-etl/action-contracts": "0.1.*" + "php-etl/workflow-console-runtime": "^0.4", + "composer/composer": "*" }, "require-dev": { "phpunit/phpunit": "^10.0", diff --git a/composer.lock b/composer.lock index 6c3a3a5e..7fec5b70 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3ccc9fefcb6d09d8ac890145392fa51f", + "content-hash": "1d274ea45f8fb52c712c6f66f5d1ce7b", "packages": [ { "name": "clue/stream-filter", From 08ab9c5e6dd96ce7aa95a8a371849b39831e0b37 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 30 Nov 2023 14:22:22 +0100 Subject: [PATCH 3/6] cs-fixer --- .github/workflows/quality.yaml | 2 +- src/Action/Custom/Factory/Action.php | 4 ++-- .../Factory/Repository/RepositoryTrait.php | 2 +- src/Action/Custom/Service.php | 4 ++-- src/Action/SFTP/Factory/Action.php | 6 +++--- .../SFTP/Factory/Repository/Repository.php | 2 +- src/Action/SFTP/Service.php | 4 ++-- src/Adapter/Docker/Satellite.php | 4 ++-- src/Adapter/Docker/SatelliteBuilder.php | 10 +++++----- src/Adapter/Filesystem/Satellite.php | 4 ++-- src/Adapter/Filesystem/SatelliteBuilder.php | 10 +++++----- src/Adapter/Tar/Satellite.php | 4 ++-- src/Adapter/Tar/SatelliteBuilder.php | 10 +++++----- src/Builder/Action.php | 4 ++-- src/Builder/Pipeline.php | 18 +++++++++--------- src/Builder/Repository/API.php | 2 +- src/Builder/Repository/Action.php | 2 +- src/Builder/Repository/Hook.php | 2 +- src/Builder/Repository/Pipeline.php | 2 +- src/Builder/Repository/Workflow.php | 2 +- src/Cloud/Console/Command/CreateCommand.php | 2 +- src/Cloud/Console/Command/RemoveCommand.php | 2 +- src/Cloud/Console/Command/UpdateCommand.php | 2 +- src/Console/Command/BuildCommand.php | 2 +- src/Console/Command/ValidateCommand.php | 2 +- .../Builder/Monolog/ElasticSearchBuilder.php | 2 +- .../Logger/Factory/ElasticSearchFactory.php | 2 +- src/Feature/Logger/Factory/GelfFactory.php | 2 +- src/Feature/Logger/Factory/StreamFactory.php | 2 +- src/Feature/Logger/Factory/SyslogFactory.php | 2 +- src/Feature/Logger/RepositoryTrait.php | 2 +- src/Feature/Logger/Service.php | 4 ++-- .../Rejection/Factory/RabbitMQFactory.php | 2 +- src/Feature/Rejection/RepositoryTrait.php | 2 +- src/Feature/Rejection/Service.php | 4 ++-- src/Feature/State/RepositoryTrait.php | 2 +- src/Feature/State/Service.php | 2 +- src/Interpreter.php | 2 +- src/Plugin/Batching/Repository.php | 6 +++--- src/Plugin/Batching/Service.php | 4 ++-- src/Plugin/Custom/Factory/Extractor.php | 4 ++-- src/Plugin/Custom/Factory/Loader.php | 4 ++-- .../Factory/Repository/RepositoryTrait.php | 2 +- src/Plugin/Custom/Factory/Transformer.php | 4 ++-- src/Plugin/Custom/Service.php | 4 ++-- src/Plugin/FTP/Factory/Loader.php | 6 +++--- .../FTP/Factory/Repository/Repository.php | 2 +- src/Plugin/FTP/Factory/Server.php | 6 +++--- src/Plugin/FTP/Service.php | 4 ++-- src/Plugin/Filtering/Factory/Drop.php | 4 ++-- src/Plugin/Filtering/Factory/Reject.php | 4 ++-- .../Factory/Repository/RepositoryTrait.php | 2 +- src/Plugin/Filtering/Service.php | 4 ++-- src/Plugin/SFTP/Factory/Extractor.php | 6 +++--- src/Plugin/SFTP/Factory/Loader.php | 6 +++--- .../SFTP/Factory/Repository/Repository.php | 2 +- src/Plugin/SFTP/Factory/Server.php | 6 +++--- src/Plugin/SFTP/Service.php | 4 ++-- src/Plugin/Stream/Repository.php | 6 +++--- src/Plugin/Stream/Service.php | 4 ++-- src/Service.php | 6 +++--- 61 files changed, 119 insertions(+), 119 deletions(-) diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 81e014bd..75470482 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -14,7 +14,7 @@ jobs: run: | wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer chmod a+x php-cs-fixer - PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run + ./php-cs-fixer fix src --dry-run phpstan: runs-on: ubuntu-latest diff --git a/src/Action/Custom/Factory/Action.php b/src/Action/Custom/Factory/Action.php index 29279a9c..eb70c1ec 100644 --- a/src/Action/Custom/Factory/Action.php +++ b/src/Action/Custom/Factory/Action.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Action/Custom/Factory/Repository/RepositoryTrait.php b/src/Action/Custom/Factory/Repository/RepositoryTrait.php index 200ef6c0..447d6fa4 100644 --- a/src/Action/Custom/Factory/Repository/RepositoryTrait.php +++ b/src/Action/Custom/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Action/Custom/Service.php b/src/Action/Custom/Service.php index be6c7550..4bd351ca 100644 --- a/src/Action/Custom/Service.php +++ b/src/Action/Custom/Service.php @@ -43,7 +43,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -54,7 +54,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Action/SFTP/Factory/Action.php b/src/Action/SFTP/Factory/Action.php index 03a51221..968853a7 100644 --- a/src/Action/SFTP/Factory/Action.php +++ b/src/Action/SFTP/Factory/Action.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -68,7 +68,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Action/SFTP/Factory/Repository/Repository.php b/src/Action/SFTP/Factory/Repository/Repository.php index 278c67dd..30614486 100644 --- a/src/Action/SFTP/Factory/Repository/Repository.php +++ b/src/Action/SFTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Action $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Action/SFTP/Service.php b/src/Action/SFTP/Service.php index 9255277d..53385fa1 100644 --- a/src/Action/SFTP/Service.php +++ b/src/Action/SFTP/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Adapter/Docker/Satellite.php b/src/Adapter/Docker/Satellite.php index e5742f2a..fd34801a 100644 --- a/src/Adapter/Docker/Satellite.php +++ b/src/Adapter/Docker/Satellite.php @@ -22,7 +22,7 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly Dockerfile\Dockerfile $dockerfile, private readonly string $workdir, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } @@ -34,7 +34,7 @@ public function addTags(string ...$imageTags): self return $this; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Docker/SatelliteBuilder.php b/src/Adapter/Docker/SatelliteBuilder.php index a5b71496..1ad2594c 100644 --- a/src/Adapter/Docker/SatelliteBuilder.php +++ b/src/Adapter/Docker/SatelliteBuilder.php @@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface private iterable $command = []; /** @var iterable */ private iterable $tags = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var iterable> */ private iterable $paths = []; /** @var \AppendIterator> */ @@ -66,8 +66,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -76,7 +76,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Adapter/Filesystem/Satellite.php b/src/Adapter/Filesystem/Satellite.php index 092aaadb..d8edbc01 100644 --- a/src/Adapter/Filesystem/Satellite.php +++ b/src/Adapter/Filesystem/Satellite.php @@ -18,12 +18,12 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly string $workdir, private readonly Composer $composer, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Filesystem/SatelliteBuilder.php b/src/Adapter/Filesystem/SatelliteBuilder.php index a7ce0409..1a400c38 100644 --- a/src/Adapter/Filesystem/SatelliteBuilder.php +++ b/src/Adapter/Filesystem/SatelliteBuilder.php @@ -20,8 +20,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface ]; private array $authenticationTokens = []; private array $repositories = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var iterable> */ private iterable $paths = []; /** @var \AppendIterator> */ @@ -54,8 +54,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -64,7 +64,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Adapter/Tar/Satellite.php b/src/Adapter/Tar/Satellite.php index e80c81b9..2eb47e88 100644 --- a/src/Adapter/Tar/Satellite.php +++ b/src/Adapter/Tar/Satellite.php @@ -19,7 +19,7 @@ final class Satellite implements Configurator\SatelliteInterface public function __construct( private readonly string $outputPath, - Packaging\FileInterface|Packaging\DirectoryInterface ...$files + Packaging\DirectoryInterface|Packaging\FileInterface ...$files ) { $this->files = $files; } @@ -31,7 +31,7 @@ public function addTags(string ...$imageTags): self return $this; } - public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Adapter/Tar/SatelliteBuilder.php b/src/Adapter/Tar/SatelliteBuilder.php index c65ac1c7..68c89afd 100644 --- a/src/Adapter/Tar/SatelliteBuilder.php +++ b/src/Adapter/Tar/SatelliteBuilder.php @@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface { /** @var iterable */ private iterable $composerRequire = []; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null; - private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null; + private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null; /** @var \AppendIterator> */ private readonly iterable $files; /** @var array> */ @@ -47,8 +47,8 @@ public function withComposerRequire(string ...$package): self } public function withComposerFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile, - PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile, + PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null ): self { $this->composerJsonFile = $composerJsonFile; $this->composerLockFile = $composerLockFile; @@ -57,7 +57,7 @@ public function withComposerFile( } public function withFile( - PackagingContract\FileInterface|PackagingContract\AssetInterface $source, + PackagingContract\AssetInterface|PackagingContract\FileInterface $source, string $destinationPath = null ): self { if (!$source instanceof PackagingContract\FileInterface) { diff --git a/src/Builder/Action.php b/src/Builder/Action.php index fea89225..3bcc2282 100644 --- a/src/Builder/Action.php +++ b/src/Builder/Action.php @@ -16,8 +16,8 @@ public function __construct( ) {} public function addAction( - Node\Expr|Builder $loader, - Node\Expr|Builder $state, + Builder|Node\Expr $loader, + Builder|Node\Expr $state, ): self { $this->action = new Node\Expr\MethodCall( var: $this->runtime, diff --git a/src/Builder/Pipeline.php b/src/Builder/Pipeline.php index 80aa8c8c..2c6a3eb1 100644 --- a/src/Builder/Pipeline.php +++ b/src/Builder/Pipeline.php @@ -16,9 +16,9 @@ public function __construct( ) {} public function addExtractor( - Node\Expr|Builder $extractor, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $extractor, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, @@ -34,9 +34,9 @@ public function addExtractor( } public function addTransformer( - Node\Expr|Builder $transformer, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $transformer, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, @@ -52,9 +52,9 @@ public function addTransformer( } public function addLoader( - Node\Expr|Builder $loader, - Node\Expr|Builder $rejection, - Node\Expr|Builder $state, + Builder|Node\Expr $loader, + Builder|Node\Expr $rejection, + Builder|Node\Expr $state, ): self { $this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall( var: $runtime, diff --git a/src/Builder/Repository/API.php b/src/Builder/Repository/API.php index 6f084207..ec96aca5 100644 --- a/src/Builder/Repository/API.php +++ b/src/Builder/Repository/API.php @@ -17,7 +17,7 @@ final class API implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\API $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Action.php b/src/Builder/Repository/Action.php index 807566ea..be8a0e73 100644 --- a/src/Builder/Repository/Action.php +++ b/src/Builder/Repository/Action.php @@ -17,7 +17,7 @@ final class Action implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Action $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Hook.php b/src/Builder/Repository/Hook.php index 849f88a6..d7d56b3a 100644 --- a/src/Builder/Repository/Hook.php +++ b/src/Builder/Repository/Hook.php @@ -17,7 +17,7 @@ final class Hook implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Hook $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Pipeline.php b/src/Builder/Repository/Pipeline.php index ac171e2d..2d82a798 100644 --- a/src/Builder/Repository/Pipeline.php +++ b/src/Builder/Repository/Pipeline.php @@ -17,7 +17,7 @@ final class Pipeline implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Pipeline $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Builder/Repository/Workflow.php b/src/Builder/Repository/Workflow.php index 23aac5b6..f4516fe6 100644 --- a/src/Builder/Repository/Workflow.php +++ b/src/Builder/Repository/Workflow.php @@ -17,7 +17,7 @@ final class Workflow implements Configurator\RepositoryInterface public function __construct(private readonly Satellite\Builder\Workflow $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Cloud/Console/Command/CreateCommand.php b/src/Cloud/Console/Command/CreateCommand.php index 834c6ae9..c3446ba4 100644 --- a/src/Cloud/Console/Command/CreateCommand.php +++ b/src/Cloud/Console/Command/CreateCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Cloud/Console/Command/RemoveCommand.php b/src/Cloud/Console/Command/RemoveCommand.php index 6608d1f8..f48e1ae7 100644 --- a/src/Cloud/Console/Command/RemoveCommand.php +++ b/src/Cloud/Console/Command/RemoveCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Cloud/Console/Command/UpdateCommand.php b/src/Cloud/Console/Command/UpdateCommand.php index 4fcd5e77..7fb93962 100644 --- a/src/Cloud/Console/Command/UpdateCommand.php +++ b/src/Cloud/Console/Command/UpdateCommand.php @@ -82,7 +82,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return self::FAILURE; diff --git a/src/Console/Command/BuildCommand.php b/src/Console/Command/BuildCommand.php index 5e6ad29c..2d1487b9 100644 --- a/src/Console/Command/BuildCommand.php +++ b/src/Console/Command/BuildCommand.php @@ -67,7 +67,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return 255; diff --git a/src/Console/Command/ValidateCommand.php b/src/Console/Command/ValidateCommand.php index e342d78c..2ae8db02 100644 --- a/src/Console/Command/ValidateCommand.php +++ b/src/Console/Command/ValidateCommand.php @@ -66,7 +66,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O try { $configuration = $service->normalize($configuration); - } catch (Config\Definition\Exception\InvalidTypeException|Config\Definition\Exception\InvalidConfigurationException $exception) { + } catch (Config\Definition\Exception\InvalidConfigurationException|Config\Definition\Exception\InvalidTypeException $exception) { $style->error($exception->getMessage()); return 255; diff --git a/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php b/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php index 1bb4018a..be01985f 100644 --- a/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php +++ b/src/Feature/Logger/Builder/Monolog/ElasticSearchBuilder.php @@ -34,7 +34,7 @@ public function withIndex(string $index): self return $this; } - public function withHosts(string|array|Expression ...$hosts): self + public function withHosts(array|Expression|string ...$hosts): self { array_push($this->hosts, ...$hosts); diff --git a/src/Feature/Logger/Factory/ElasticSearchFactory.php b/src/Feature/Logger/Factory/ElasticSearchFactory.php index 366bdcf0..7e265448 100644 --- a/src/Feature/Logger/Factory/ElasticSearchFactory.php +++ b/src/Feature/Logger/Factory/ElasticSearchFactory.php @@ -36,7 +36,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/GelfFactory.php b/src/Feature/Logger/Factory/GelfFactory.php index 132872ef..c7017afe 100644 --- a/src/Feature/Logger/Factory/GelfFactory.php +++ b/src/Feature/Logger/Factory/GelfFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/StreamFactory.php b/src/Feature/Logger/Factory/StreamFactory.php index 2886bac7..0048058d 100644 --- a/src/Feature/Logger/Factory/StreamFactory.php +++ b/src/Feature/Logger/Factory/StreamFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/Factory/SyslogFactory.php b/src/Feature/Logger/Factory/SyslogFactory.php index 7bf4b8f5..9d2ad46c 100644 --- a/src/Feature/Logger/Factory/SyslogFactory.php +++ b/src/Feature/Logger/Factory/SyslogFactory.php @@ -33,7 +33,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Logger/RepositoryTrait.php b/src/Feature/Logger/RepositoryTrait.php index ed522a90..f2d6ae88 100644 --- a/src/Feature/Logger/RepositoryTrait.php +++ b/src/Feature/Logger/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/Logger/Service.php b/src/Feature/Logger/Service.php index 7e1af794..9de85707 100644 --- a/src/Feature/Logger/Service.php +++ b/src/Feature/Logger/Service.php @@ -42,7 +42,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -158,7 +158,7 @@ public function compile(array $config): Repository $builder->withLogger($monologBuilder->getNode()); return $repository; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Feature/Rejection/Factory/RabbitMQFactory.php b/src/Feature/Rejection/Factory/RabbitMQFactory.php index 2f785ba9..7de68b4f 100644 --- a/src/Feature/Rejection/Factory/RabbitMQFactory.php +++ b/src/Feature/Rejection/Factory/RabbitMQFactory.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Feature/Rejection/RepositoryTrait.php b/src/Feature/Rejection/RepositoryTrait.php index c0545d79..118dc131 100644 --- a/src/Feature/Rejection/RepositoryTrait.php +++ b/src/Feature/Rejection/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/Rejection/Service.php b/src/Feature/Rejection/Service.php index 9a10e741..3296a24a 100644 --- a/src/Feature/Rejection/Service.php +++ b/src/Feature/Rejection/Service.php @@ -41,7 +41,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -82,7 +82,7 @@ public function compile(array $config): Repository } return $repository; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Feature/State/RepositoryTrait.php b/src/Feature/State/RepositoryTrait.php index 1d0943d6..c2f89736 100644 --- a/src/Feature/State/RepositoryTrait.php +++ b/src/Feature/State/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { array_push($this->files, ...$files); diff --git a/src/Feature/State/Service.php b/src/Feature/State/Service.php index 72720cba..7b6cf1b5 100644 --- a/src/Feature/State/Service.php +++ b/src/Feature/State/Service.php @@ -41,7 +41,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } diff --git a/src/Interpreter.php b/src/Interpreter.php index 1b98d7f5..87221bfb 100644 --- a/src/Interpreter.php +++ b/src/Interpreter.php @@ -14,7 +14,7 @@ final class Interpreter private readonly array $expressionFunctions; public function __construct( - ExpressionFunctionProviderInterface|ExpressionFunction ...$expressionFunctions + ExpressionFunction|ExpressionFunctionProviderInterface ...$expressionFunctions ) { $this->expressionFunctions = $expressionFunctions; } diff --git a/src/Plugin/Batching/Repository.php b/src/Plugin/Batching/Repository.php index 23dd6c42..cb4d4e14 100644 --- a/src/Plugin/Batching/Repository.php +++ b/src/Plugin/Batching/Repository.php @@ -11,9 +11,9 @@ final readonly class Repository implements Configurator\StepRepositoryInterface { - public function __construct(private Merge|Fork $builder) {} + public function __construct(private Fork|Merge $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } @@ -33,7 +33,7 @@ public function getPackages(): iterable return new \EmptyIterator(); } - public function getBuilder(): Merge|Fork + public function getBuilder(): Fork|Merge { return $this->builder; } diff --git a/src/Plugin/Batching/Service.php b/src/Plugin/Batching/Service.php index 9bf76aab..d3204bb9 100644 --- a/src/Plugin/Batching/Service.php +++ b/src/Plugin/Batching/Service.php @@ -55,7 +55,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -66,7 +66,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Extractor.php b/src/Plugin/Custom/Factory/Extractor.php index ccf1088d..5690023d 100644 --- a/src/Plugin/Custom/Factory/Extractor.php +++ b/src/Plugin/Custom/Factory/Extractor.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Loader.php b/src/Plugin/Custom/Factory/Loader.php index aed11d17..69a17a52 100644 --- a/src/Plugin/Custom/Factory/Loader.php +++ b/src/Plugin/Custom/Factory/Loader.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php b/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php index c8a7b63b..fb9a52a6 100644 --- a/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php +++ b/src/Plugin/Custom/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Plugin/Custom/Factory/Transformer.php b/src/Plugin/Custom/Factory/Transformer.php index 23a99803..5beb12e3 100644 --- a/src/Plugin/Custom/Factory/Transformer.php +++ b/src/Plugin/Custom/Factory/Transformer.php @@ -44,7 +44,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -55,7 +55,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Custom/Service.php b/src/Plugin/Custom/Service.php index 69a862dd..0818a8e4 100644 --- a/src/Plugin/Custom/Service.php +++ b/src/Plugin/Custom/Service.php @@ -47,7 +47,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -58,7 +58,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/FTP/Factory/Loader.php b/src/Plugin/FTP/Factory/Loader.php index 0e501b8c..f9caa4a7 100644 --- a/src/Plugin/FTP/Factory/Loader.php +++ b/src/Plugin/FTP/Factory/Loader.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -88,7 +88,7 @@ public function compile(array $config): RepositoryInterface try { return new FTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/FTP/Factory/Repository/Repository.php b/src/Plugin/FTP/Factory/Repository/Repository.php index 240170e9..81b74abf 100644 --- a/src/Plugin/FTP/Factory/Repository/Repository.php +++ b/src/Plugin/FTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Loader|Builder\Server $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Plugin/FTP/Factory/Server.php b/src/Plugin/FTP/Factory/Server.php index 28530ff6..8bd71dd2 100644 --- a/src/Plugin/FTP/Factory/Server.php +++ b/src/Plugin/FTP/Factory/Server.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -49,7 +49,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -75,7 +75,7 @@ public function compile(array $config): FTP\Factory\Repository\Repository try { return new FTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/FTP/Service.php b/src/Plugin/FTP/Service.php index 33a816de..da93e63e 100644 --- a/src/Plugin/FTP/Service.php +++ b/src/Plugin/FTP/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Filtering/Factory/Drop.php b/src/Plugin/Filtering/Factory/Drop.php index 5236e40a..0736b536 100644 --- a/src/Plugin/Filtering/Factory/Drop.php +++ b/src/Plugin/Filtering/Factory/Drop.php @@ -40,7 +40,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -51,7 +51,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Filtering/Factory/Reject.php b/src/Plugin/Filtering/Factory/Reject.php index 047a919f..73cb67a0 100644 --- a/src/Plugin/Filtering/Factory/Reject.php +++ b/src/Plugin/Filtering/Factory/Reject.php @@ -40,7 +40,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -51,7 +51,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php b/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php index f332d595..1457f00d 100644 --- a/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php +++ b/src/Plugin/Filtering/Factory/Repository/RepositoryTrait.php @@ -14,7 +14,7 @@ trait RepositoryTrait /** @var string[] */ private array $packages; - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface { array_push($this->files, ...$files); diff --git a/src/Plugin/Filtering/Service.php b/src/Plugin/Filtering/Service.php index f63c4021..8c04104b 100644 --- a/src/Plugin/Filtering/Service.php +++ b/src/Plugin/Filtering/Service.php @@ -46,7 +46,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -57,7 +57,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/SFTP/Factory/Extractor.php b/src/Plugin/SFTP/Factory/Extractor.php index 014eb4e9..dc4e97ed 100644 --- a/src/Plugin/SFTP/Factory/Extractor.php +++ b/src/Plugin/SFTP/Factory/Extractor.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -87,7 +87,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Factory/Loader.php b/src/Plugin/SFTP/Factory/Loader.php index 1213dcee..e24b3611 100644 --- a/src/Plugin/SFTP/Factory/Loader.php +++ b/src/Plugin/SFTP/Factory/Loader.php @@ -39,7 +39,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -50,7 +50,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -87,7 +87,7 @@ public function compile(array $config): Repository try { return new Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Factory/Repository/Repository.php b/src/Plugin/SFTP/Factory/Repository/Repository.php index 8ed17a76..d6277f17 100644 --- a/src/Plugin/SFTP/Factory/Repository/Repository.php +++ b/src/Plugin/SFTP/Factory/Repository/Repository.php @@ -12,7 +12,7 @@ { public function __construct(private Builder\Loader|Builder\Server $builder) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } diff --git a/src/Plugin/SFTP/Factory/Server.php b/src/Plugin/SFTP/Factory/Server.php index 62e498fa..1a2f7d02 100644 --- a/src/Plugin/SFTP/Factory/Server.php +++ b/src/Plugin/SFTP/Factory/Server.php @@ -38,7 +38,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -49,7 +49,7 @@ public function validate(array $config): bool $this->normalize($config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } @@ -84,7 +84,7 @@ public function compile(array $config): SFTP\Factory\Repository\Repository try { return new SFTP\Factory\Repository\Repository($builder); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception); } } diff --git a/src/Plugin/SFTP/Service.php b/src/Plugin/SFTP/Service.php index ba5992c5..e0ae7a85 100644 --- a/src/Plugin/SFTP/Service.php +++ b/src/Plugin/SFTP/Service.php @@ -46,7 +46,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -57,7 +57,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Plugin/Stream/Repository.php b/src/Plugin/Stream/Repository.php index 79bb0dff..c2f9b53c 100644 --- a/src/Plugin/Stream/Repository.php +++ b/src/Plugin/Stream/Repository.php @@ -10,10 +10,10 @@ final readonly class Repository implements Configurator\StepRepositoryInterface { public function __construct( - private Builder\StderrLoader|Builder\StdoutLoader|Builder\JSONStreamLoader|Builder\DebugLoader $builder + private Builder\DebugLoader|Builder\JSONStreamLoader|Builder\StderrLoader|Builder\StdoutLoader $builder ) {} - public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self + public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self { return $this; } @@ -33,7 +33,7 @@ public function getPackages(): iterable return new \EmptyIterator(); } - public function getBuilder(): Builder\StderrLoader|Builder\StdoutLoader|Builder\JSONStreamLoader|Builder\DebugLoader + public function getBuilder(): Builder\DebugLoader|Builder\JSONStreamLoader|Builder\StderrLoader|Builder\StdoutLoader { return $this->builder; } diff --git a/src/Plugin/Stream/Service.php b/src/Plugin/Stream/Service.php index 3f3e11a9..c1fba50c 100644 --- a/src/Plugin/Stream/Service.php +++ b/src/Plugin/Stream/Service.php @@ -45,7 +45,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -56,7 +56,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } diff --git a/src/Service.php b/src/Service.php index e55a0ca8..079ddec4 100644 --- a/src/Service.php +++ b/src/Service.php @@ -147,7 +147,7 @@ public function registerRuntimes(Satellite\Runtime\FactoryInterface ...$runtimes return $this; } - public function registerPlugins(Configurator\PipelinePluginInterface|Configurator\PipelineFeatureInterface ...$plugins): self + public function registerPlugins(Configurator\PipelineFeatureInterface|Configurator\PipelinePluginInterface ...$plugins): self { foreach ($plugins as $plugin) { /** @var Configurator\Feature $attribute */ @@ -188,7 +188,7 @@ public function normalize(array $config): array { try { return $this->processor->processConfiguration($this->configuration, $config); - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) { throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception); } } @@ -199,7 +199,7 @@ public function validate(array $config): bool $this->processor->processConfiguration($this->configuration, $config); return true; - } catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) { + } catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) { return false; } } From 2de9a08c304dea602b067abad9affaf9d4687e19 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 30 Nov 2023 14:45:31 +0100 Subject: [PATCH 4/6] fix phpunit conf and infection github workflow --- .github/workflows/infection.yaml | 4 ++-- phpunit.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/infection.yaml b/.github/workflows/infection.yaml index c5adb1e1..aacb82d0 100644 --- a/.github/workflows/infection.yaml +++ b/.github/workflows/infection.yaml @@ -23,8 +23,8 @@ jobs: - name: Infection run: | - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc + wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar + wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar.asc chmod +x infection.phar ./infection.phar diff --git a/phpunit.xml b/phpunit.xml index 69e8735d..481cb5c9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ vendor/ - + - src + src - + From 5c869de596c2d65c938678417c6bcb5b462c1fcb Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 30 Nov 2023 15:34:07 +0100 Subject: [PATCH 5/6] lock version on pipeline-console-runtime --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1b991eb1..d1ccd34a 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "php-etl/packaging": "*", "php-etl/configurator-contracts": "0.8.*", "php-etl/satellite-toolbox": "*", - "php-etl/pipeline-console-runtime": "*", + "php-etl/pipeline-console-runtime": "^0.2", "php-etl/gyroscops-api-client": "*", "php-etl/dockerfile": "*", "php-etl/pipeline": "*", diff --git a/composer.lock b/composer.lock index 7fec5b70..abb49d3f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1d274ea45f8fb52c712c6f66f5d1ce7b", + "content-hash": "6d0cff1b107d217b9f48461beb834bac", "packages": [ { "name": "clue/stream-filter", From 11226ba5e516bdd4431faeb4a58b7e2903d9775d Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 1 Dec 2023 15:10:15 +0100 Subject: [PATCH 6/6] add a '*' on the rabbitmq repository to force composer to search package with compatibility --- src/Feature/Rejection/Factory/Repository/RabbitMQRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Feature/Rejection/Factory/Repository/RabbitMQRepository.php b/src/Feature/Rejection/Factory/Repository/RabbitMQRepository.php index c2027353..680d6194 100644 --- a/src/Feature/Rejection/Factory/Repository/RabbitMQRepository.php +++ b/src/Feature/Rejection/Factory/Repository/RabbitMQRepository.php @@ -15,7 +15,7 @@ public function __construct(private readonly Rejection\Builder\RabbitMQBuilder $ { $this->files = []; $this->packages = [ - 'php-etl/rabbitmq-flow', + 'php-etl/rabbitmq-flow:*', ]; }