diff --git a/composer.json b/composer.json index 9016c527..8fc8e928 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "php-etl/packaging": "*", "php-etl/configurator-contracts": "0.8.*", "php-etl/satellite-toolbox": "*", - "php-etl/gyroscops-api-client": "*", + "php-etl/gyroscops-api-client": "^0.3.0", "php-etl/dockerfile": "*", "composer/composer": "*", "symfony/deprecation-contracts": "*", diff --git a/composer.lock b/composer.lock index 463a1b56..c52fbd27 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": "79cb51665cfefdd58d4aa51b6737a8e9", + "content-hash": "62f878223223ac87d5e0ffa323666abc", "packages": [ { "name": "clue/stream-filter", diff --git a/src/Cloud/Handler/Pipeline/AddPipelineStepProbeCommandHandler.php b/src/Cloud/Handler/Pipeline/AddPipelineStepProbeCommandHandler.php index 97f84f15..24489f19 100644 --- a/src/Cloud/Handler/Pipeline/AddPipelineStepProbeCommandHandler.php +++ b/src/Cloud/Handler/Pipeline/AddPipelineStepProbeCommandHandler.php @@ -20,7 +20,7 @@ public function __invoke(Cloud\Command\Pipeline\AddPipelineStepProbeCommand $com /** @var \stdClass $result */ $result = $this->client->addPipelineStepProbePipelineItem( $command->pipeline->asString(), - (new Api\Model\PipelineAddPipelineStepProbCommandInput()) + (new Api\Model\PipelineAddPipelineStepProbeCommandInput()) ->setProbe( (new Api\Model\Probe()) ->setCode($command->probe->code) diff --git a/src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php b/src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php index d45588d1..66b41643 100644 --- a/src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php +++ b/src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php @@ -7,7 +7,6 @@ use Gyroscops\Api; use Kiboko\Component\Satellite\Cloud; use Kiboko\Component\Satellite\Cloud\DTO\Probe; -use Kiboko\Component\Satellite\Cloud\DTO\PSR4AutoloadConfig; use Kiboko\Component\Satellite\Cloud\DTO\Step; final readonly class DeclarePipelineCommandHandler @@ -26,7 +25,7 @@ public function __invoke(Cloud\Command\Pipeline\DeclarePipelineCommand $command) ->setLabel($command->label) ->setCode($command->code) ->setSteps($command->steps->map( - fn (Step $step) => (new Api\Model\StepInput()) + fn (Step $step) => (new Api\Model\Step()) ->setCode((string) $step->code) ->setLabel($step->label) ->setConfiguration($step->config) @@ -34,23 +33,8 @@ public function __invoke(Cloud\Command\Pipeline\DeclarePipelineCommand $command) fn (Probe $probe) => (new Api\Model\Probe())->setCode($probe->code)->setLabel($probe->label)) ) )) - ->setAutoloads($command->autoload->map( - fn (PSR4AutoloadConfig $autoloadConfig) => (new Api\Model\AutoloadInput()) - ->setNamespace($autoloadConfig->namespace) - ->setPaths($autoloadConfig->paths) - )) - ->setPackages($command->packages->transform()) - ->setAuths($command->auths->map( - fn (Cloud\DTO\Auth $auth) => (new Api\Model\AddPipelineComposerAuthCommandInput()) - ->setUrl($auth->url) - ->setToken($auth->token) - )) - ->setRepositories($command->repositories->map( - fn (Cloud\DTO\Repository $repository) => (new Api\Model\AddPipelineComposerRepositoryCommandInput()) - ->setName($repository->name) - ->setType($repository->type) - ->setUrl($repository->url) - )), + // TODO : implements the composer declaration + // ->setComposer(), ); } catch (Api\Exception\DeclarePipelinePipelineCollectionBadRequestException $exception) { throw new Cloud\DeclarePipelineFailedException('Something went wrong while declaring the pipeline. Maybe your client is not up to date, you may want to update your Gyroscops client.', previous: $exception); diff --git a/src/Plugin/Batching/Service.php b/src/Plugin/Batching/Service.php index d3204bb9..5dbea56c 100644 --- a/src/Plugin/Batching/Service.php +++ b/src/Plugin/Batching/Service.php @@ -4,11 +4,10 @@ namespace Kiboko\Component\Satellite\Plugin\Batching; -// FIXME: hidden dependency to php-etl/fast-map -use Kiboko\Component\FastMap\Compiler\Builder\PropertyPathBuilder; use Kiboko\Component\Satellite\ExpressionLanguage as Satellite; use Kiboko\Component\Satellite\Plugin\Batching\Builder\Fork; use Kiboko\Component\Satellite\Plugin\Batching\Builder\Merge; +use Kiboko\Component\SatelliteToolbox\Builder\PropertyPathBuilder; use Kiboko\Contract\Configurator; use PhpParser\Node\Expr\Variable; use Symfony\Component\Config\Definition\Exception as Symfony;