Skip to content

Commit 7677544

Browse files
authored
Merge pull request #142 from php-etl/fix/action-contracts-version-lock
Lock workflow-console-runtime version
2 parents c3c1471 + 11226ba commit 7677544

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+129
-129
lines changed

.github/workflows/infection.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323

2424
- name: Infection
2525
run: |
26-
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar
27-
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc
26+
wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar
27+
wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar.asc
2828
chmod +x infection.phar
2929
./infection.phar
3030

.github/workflows/quality.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: |
1515
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
1616
chmod a+x php-cs-fixer
17-
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
17+
./php-cs-fixer fix src --dry-run
1818
1919
phpstan:
2020
runs-on: ubuntu-latest

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"php-etl/packaging": "*",
3434
"php-etl/configurator-contracts": "0.8.*",
3535
"php-etl/satellite-toolbox": "*",
36-
"php-etl/pipeline-console-runtime": "*",
36+
"php-etl/pipeline-console-runtime": "^0.2",
3737
"php-etl/gyroscops-api-client": "*",
3838
"php-etl/dockerfile": "*",
3939
"php-etl/pipeline": "*",
40-
"php-etl/workflow-console-runtime": "*",
40+
"php-etl/workflow-console-runtime": "^0.4",
4141
"composer/composer": "*"
4242
},
4343
"require-dev": {

composer.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
55
backupGlobals="true"
66
colors="false"
77
processIsolation="false"
@@ -30,11 +30,11 @@
3030
<exclude>vendor/</exclude>
3131
</testsuite>
3232
</testsuites>
33-
<coverage>
33+
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
3434
<include>
35-
<directory suffix=".php">src</directory>
35+
<directory>src</directory>
3636
</include>
37-
</coverage>
37+
</source>
3838
<php>
3939
<ini name="allow_url_include" value="1" />
4040
</php>

src/Action/Custom/Factory/Action.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function normalize(array $config): array
4444
{
4545
try {
4646
return $this->processor->processConfiguration($this->configuration, $config);
47-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
47+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4848
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4949
}
5050
}
@@ -55,7 +55,7 @@ public function validate(array $config): bool
5555
$this->processor->processConfiguration($this->configuration, $config);
5656

5757
return true;
58-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
58+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5959
return false;
6060
}
6161
}

src/Action/Custom/Factory/Repository/RepositoryTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait RepositoryTrait
1414
/** @var string[] */
1515
private array $packages;
1616

17-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
17+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
1818
{
1919
array_push($this->files, ...$files);
2020

src/Action/Custom/Service.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function normalize(array $config): array
4343
{
4444
try {
4545
return $this->processor->processConfiguration($this->configuration, $config);
46-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
46+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4747
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4848
}
4949
}
@@ -54,7 +54,7 @@ public function validate(array $config): bool
5454
$this->processor->processConfiguration($this->configuration, $config);
5555

5656
return true;
57-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
57+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5858
return false;
5959
}
6060
}

src/Action/SFTP/Factory/Action.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function normalize(array $config): array
3939
{
4040
try {
4141
return $this->processor->processConfiguration($this->configuration, $config);
42-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
42+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4343
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
4444
}
4545
}
@@ -50,7 +50,7 @@ public function validate(array $config): bool
5050
$this->normalize($config);
5151

5252
return true;
53-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
53+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
5454
return false;
5555
}
5656
}
@@ -68,7 +68,7 @@ public function compile(array $config): Repository
6868

6969
try {
7070
return new Repository($builder);
71-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
71+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
7272
throw new Configurator\InvalidConfigurationException(message: $exception->getMessage(), previous: $exception);
7373
}
7474
}

src/Action/SFTP/Factory/Repository/Repository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
public function __construct(private Builder\Action $builder) {}
1414

15-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
15+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
1616
{
1717
return $this;
1818
}

src/Action/SFTP/Service.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function normalize(array $config): array
4545
{
4646
try {
4747
return $this->processor->processConfiguration($this->configuration, $config);
48-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException $exception) {
48+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException $exception) {
4949
throw new Configurator\InvalidConfigurationException($exception->getMessage(), 0, $exception);
5050
}
5151
}
@@ -56,7 +56,7 @@ public function validate(array $config): bool
5656
$this->processor->processConfiguration($this->configuration, $config);
5757

5858
return true;
59-
} catch (Symfony\InvalidTypeException|Symfony\InvalidConfigurationException) {
59+
} catch (Symfony\InvalidConfigurationException|Symfony\InvalidTypeException) {
6060
return false;
6161
}
6262
}

src/Adapter/Docker/Satellite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class Satellite implements Configurator\SatelliteInterface
2222
public function __construct(
2323
private readonly Dockerfile\Dockerfile $dockerfile,
2424
private readonly string $workdir,
25-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
25+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2626
) {
2727
$this->files = $files;
2828
}
@@ -34,7 +34,7 @@ public function addTags(string ...$imageTags): self
3434
return $this;
3535
}
3636

37-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
37+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
3838
{
3939
array_push($this->files, ...$files);
4040

src/Adapter/Docker/SatelliteBuilder.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
2323
private iterable $command = [];
2424
/** @var iterable<string> */
2525
private iterable $tags = [];
26-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
27-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
26+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
27+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
2828
/** @var iterable<array<string, string>> */
2929
private iterable $paths = [];
3030
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -66,8 +66,8 @@ public function withComposerRequire(string ...$package): self
6666
}
6767

6868
public function withComposerFile(
69-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
70-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
69+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
70+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
7171
): self {
7272
$this->composerJsonFile = $composerJsonFile;
7373
$this->composerLockFile = $composerLockFile;
@@ -76,7 +76,7 @@ public function withComposerFile(
7676
}
7777

7878
public function withFile(
79-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
79+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
8080
string $destinationPath = null
8181
): self {
8282
if (!$source instanceof PackagingContract\FileInterface) {

src/Adapter/Filesystem/Satellite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ final class Satellite implements Configurator\SatelliteInterface
1818
public function __construct(
1919
private readonly string $workdir,
2020
private readonly Composer $composer,
21-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
21+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2222
) {
2323
$this->files = $files;
2424
}
2525

26-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
26+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
2727
{
2828
array_push($this->files, ...$files);
2929

src/Adapter/Filesystem/SatelliteBuilder.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
2020
];
2121
private array $authenticationTokens = [];
2222
private array $repositories = [];
23-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
24-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
23+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
24+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
2525
/** @var iterable<array<string, string>> */
2626
private iterable $paths = [];
2727
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
@@ -54,8 +54,8 @@ public function withComposerRequire(string ...$package): self
5454
}
5555

5656
public function withComposerFile(
57-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
58-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
57+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
58+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
5959
): self {
6060
$this->composerJsonFile = $composerJsonFile;
6161
$this->composerLockFile = $composerLockFile;
@@ -64,7 +64,7 @@ public function withComposerFile(
6464
}
6565

6666
public function withFile(
67-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
67+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
6868
string $destinationPath = null
6969
): self {
7070
if (!$source instanceof PackagingContract\FileInterface) {

src/Adapter/Tar/Satellite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Satellite implements Configurator\SatelliteInterface
1919

2020
public function __construct(
2121
private readonly string $outputPath,
22-
Packaging\FileInterface|Packaging\DirectoryInterface ...$files
22+
Packaging\DirectoryInterface|Packaging\FileInterface ...$files
2323
) {
2424
$this->files = $files;
2525
}
@@ -31,7 +31,7 @@ public function addTags(string ...$imageTags): self
3131
return $this;
3232
}
3333

34-
public function withFile(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): self
34+
public function withFile(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): self
3535
{
3636
array_push($this->files, ...$files);
3737

src/Adapter/Tar/SatelliteBuilder.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ final class SatelliteBuilder implements Configurator\SatelliteBuilderInterface
1313
{
1414
/** @var iterable<string> */
1515
private iterable $composerRequire = [];
16-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile = null;
17-
private null|PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null;
16+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile = null;
17+
private null|PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null;
1818
/** @var \AppendIterator<string,PackagingContract\FileInterface, \Iterator<string,PackagingContract\FileInterface>> */
1919
private readonly iterable $files;
2020
/** @var array<string, array<string, string>> */
@@ -47,8 +47,8 @@ public function withComposerRequire(string ...$package): self
4747
}
4848

4949
public function withComposerFile(
50-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerJsonFile,
51-
PackagingContract\FileInterface|PackagingContract\AssetInterface $composerLockFile = null
50+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerJsonFile,
51+
PackagingContract\AssetInterface|PackagingContract\FileInterface $composerLockFile = null
5252
): self {
5353
$this->composerJsonFile = $composerJsonFile;
5454
$this->composerLockFile = $composerLockFile;
@@ -57,7 +57,7 @@ public function withComposerFile(
5757
}
5858

5959
public function withFile(
60-
PackagingContract\FileInterface|PackagingContract\AssetInterface $source,
60+
PackagingContract\AssetInterface|PackagingContract\FileInterface $source,
6161
string $destinationPath = null
6262
): self {
6363
if (!$source instanceof PackagingContract\FileInterface) {

src/Builder/Action.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public function __construct(
1616
) {}
1717

1818
public function addAction(
19-
Node\Expr|Builder $loader,
20-
Node\Expr|Builder $state,
19+
Builder|Node\Expr $loader,
20+
Builder|Node\Expr $state,
2121
): self {
2222
$this->action = new Node\Expr\MethodCall(
2323
var: $this->runtime,

src/Builder/Pipeline.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public function __construct(
1616
) {}
1717

1818
public function addExtractor(
19-
Node\Expr|Builder $extractor,
20-
Node\Expr|Builder $rejection,
21-
Node\Expr|Builder $state,
19+
Builder|Node\Expr $extractor,
20+
Builder|Node\Expr $rejection,
21+
Builder|Node\Expr $state,
2222
): self {
2323
$this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall(
2424
var: $runtime,
@@ -34,9 +34,9 @@ public function addExtractor(
3434
}
3535

3636
public function addTransformer(
37-
Node\Expr|Builder $transformer,
38-
Node\Expr|Builder $rejection,
39-
Node\Expr|Builder $state,
37+
Builder|Node\Expr $transformer,
38+
Builder|Node\Expr $rejection,
39+
Builder|Node\Expr $state,
4040
): self {
4141
$this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall(
4242
var: $runtime,
@@ -52,9 +52,9 @@ public function addTransformer(
5252
}
5353

5454
public function addLoader(
55-
Node\Expr|Builder $loader,
56-
Node\Expr|Builder $rejection,
57-
Node\Expr|Builder $state,
55+
Builder|Node\Expr $loader,
56+
Builder|Node\Expr $rejection,
57+
Builder|Node\Expr $state,
5858
): self {
5959
$this->steps[] = fn (Node\Expr $runtime) => new Node\Expr\MethodCall(
6060
var: $runtime,

src/Builder/Repository/API.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class API implements Configurator\RepositoryInterface
1717

1818
public function __construct(private readonly Satellite\Builder\API $builder) {}
1919

20-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
20+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
2121
{
2222
array_push($this->files, ...$files);
2323

src/Builder/Repository/Action.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Action implements Configurator\RepositoryInterface
1717

1818
public function __construct(private readonly Satellite\Builder\Action $builder) {}
1919

20-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
20+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
2121
{
2222
array_push($this->files, ...$files);
2323

src/Builder/Repository/Hook.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Hook implements Configurator\RepositoryInterface
1717

1818
public function __construct(private readonly Satellite\Builder\Hook $builder) {}
1919

20-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
20+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
2121
{
2222
array_push($this->files, ...$files);
2323

src/Builder/Repository/Pipeline.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Pipeline implements Configurator\RepositoryInterface
1717

1818
public function __construct(private readonly Satellite\Builder\Pipeline $builder) {}
1919

20-
public function addFiles(Packaging\FileInterface|Packaging\DirectoryInterface ...$files): Configurator\RepositoryInterface
20+
public function addFiles(Packaging\DirectoryInterface|Packaging\FileInterface ...$files): Configurator\RepositoryInterface
2121
{
2222
array_push($this->files, ...$files);
2323

0 commit comments

Comments
 (0)