Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock workflow-console-runtime version #142

Merged
merged 6 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/infection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"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": "*",
"php-etl/workflow-console-runtime": "*",
"php-etl/workflow-console-runtime": "^0.4",
"composer/composer": "*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
backupGlobals="true"
colors="false"
processIsolation="false"
Expand Down Expand Up @@ -30,11 +30,11 @@
<exclude>vendor/</exclude>
</testsuite>
</testsuites>
<coverage>
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
<include>
<directory suffix=".php">src</directory>
<directory>src</directory>
</include>
</coverage>
</source>
<php>
<ini name="allow_url_include" value="1" />
</php>
Expand Down
4 changes: 2 additions & 2 deletions src/Action/Custom/Factory/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
private readonly Processor $processor;
private readonly ConfigurationInterface $configuration;

public function __construct(

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan6

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.

Check failure on line 27 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan8

Method Kiboko\Component\Satellite\Action\Custom\Factory\Action::__construct() has parameter $providers with no value type specified in iterable type array.
private readonly ExpressionLanguage $interpreter = new Satellite\ExpressionLanguage(),
private readonly array $providers = [],
) {
Expand All @@ -44,7 +44,7 @@
{
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);
}
}
Expand All @@ -55,7 +55,7 @@
$this->processor->processConfiguration($this->configuration, $config);

return true;
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
return false;
}
}
Expand All @@ -81,7 +81,7 @@
new Packaging\File(
sprintf('%s.php', $containerName),
new Packaging\Asset\InMemory(
$dumper->dump(['class' => $containerName, 'namespace' => 'GyroscopsGenerated'])

Check failure on line 84 in src/Action/Custom/Factory/Action.php

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #1 $content of class Kiboko\Component\Packaging\Asset\InMemory constructor expects string, array|string given.
)
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/Action/Custom/Factory/Repository/RepositoryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/Action/Custom/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{
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);
}
}
Expand All @@ -54,7 +54,7 @@
$this->processor->processConfiguration($this->configuration, $config);

return true;
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
return false;
}
}
Expand All @@ -71,7 +71,7 @@
&& \count($config['expression_language'])
) {
foreach ($config['expression_language'] as $provider) {
$interpreter->registerProvider(new $provider());

Check failure on line 74 in src/Action/Custom/Service.php

View workflow job for this annotation

GitHub Actions / phpstan7

Parameter #1 $provider of method Symfony\Component\ExpressionLanguage\ExpressionLanguage::registerProvider() expects Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface, object given.
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Action/SFTP/Factory/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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;
}
}
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Action/SFTP/Factory/Repository/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Action/SFTP/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Docker/Satellite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Docker/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
private iterable $command = [];
/** @var iterable<string> */
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<array<string, string>> */
private iterable $paths = [];
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
Expand Down Expand Up @@ -66,8 +66,8 @@
}

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;
Expand All @@ -76,7 +76,7 @@
}

public function withFile(
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
string $destinationPath = null
): self {
if (!$source instanceof PackagingContract\FileInterface) {
Expand All @@ -85,7 +85,7 @@

$this->paths[] = [$source->getPath(), $destinationPath ?? $source->getPath()];

$this->files->append(new \ArrayIterator([

Check failure on line 88 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File($destinationPath, $source),
]));

Expand Down Expand Up @@ -152,13 +152,13 @@

if (null !== $this->composerJsonFile) {
$dockerfile->push(new Dockerfile\Dockerfile\Copy('composer.json', 'composer.json'));
$this->files->append(new \ArrayIterator([

Check failure on line 155 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File('composer.json', $this->composerJsonFile),
]));

if (null !== $this->composerLockFile) {
$dockerfile->push(new Dockerfile\Dockerfile\Copy('composer.json', 'composer.lock'));
$this->files->append(new \ArrayIterator([

Check failure on line 161 in src/Adapter/Docker/SatelliteBuilder.php

View workflow job for this annotation

GitHub Actions / phpstan5

Parameter #1 $iterator of method AppendIterator<string,Kiboko\Contract\Packaging\FileInterface,Iterator<string, Kiboko\Contract\Packaging\FileInterface>>::append() expects Iterator<string, Kiboko\Contract\Packaging\FileInterface>, ArrayIterator<int, Kiboko\Component\Packaging\File> given.
new Packaging\File('composer.lock', $this->composerLockFile),
]));
}
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Filesystem/Satellite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Filesystem/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<array<string, string>> */
private iterable $paths = [];
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Tar/Satellite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Tar/SatelliteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
{
/** @var iterable<string> */
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<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
private readonly iterable $files;
/** @var array<string, array<string, string>> */
Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 9 additions & 9 deletions src/Builder/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Repository/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Repository/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Repository/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Repository/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading
Loading