Skip to content

Commit

Permalink
Upgrade tools
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Oct 21, 2024
1 parent 24b9244 commit 76ab7e3
Show file tree
Hide file tree
Showing 14 changed files with 86,754 additions and 74,752 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/analyzers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.3', '8.4']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand All @@ -23,3 +23,4 @@ jobs:
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: composer run psalm
continue-on-error: ${{ matrix.php-versions == '8.4'}}
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.3', '8.4']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.3', '8.4']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.3', '8.4']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpunit" version="^9.5.26" installed="9.5.26" location="./tools/phpunit.phar" copy="true"/>
<phar name="psalm" version="^4.29.0" installed="4.29.0" location="./tools/psalm.phar" copy="true"/>
<phar name="infection" version="^0.26" installed="0.26.1" location="./tools/infection.phar" copy="true"/>
<phar name="php-cs-fixer" version="^3.13.0" installed="3.13.0" location="./tools/php-cs-fixer.phar" copy="true"/>
<phar name="phpunit" version="^9.5.26" installed="9.6.21" location="./tools/phpunit.phar" copy="true"/>
<phar name="psalm" version="^5.26.1" installed="5.26.1" location="./tools/psalm.phar" copy="true"/>
<phar name="infection" version="^0.26" installed="0.26.21" location="./tools/infection.phar" copy="true"/>
<phar name="php-cs-fixer" version="^3.13.0" installed="3.64.0" location="./tools/php-cs-fixer.phar" copy="true"/>
</phive>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"composer-plugin-api": "~2.0"
},
"require-dev": {
Expand Down
2 changes: 2 additions & 0 deletions src/Executor/AsyncTaskExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function __invoke(string $task, array $args): PromiseInterface
* @param list<string> $args
*
* @throws ParallelException
*
* @psalm-suppress RiskyTruthyFalsyComparison
*/
private function buildProcess(string $task, array $args): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Finder/PhpExecutableFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function default(): self
public function __invoke(): string
{
$phpPath = $this->finder->find(false);

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }

Check warning on line 34 in src/Finder/PhpExecutableFinder.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 @ ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public function __invoke() : string { - $phpPath = $this->finder->find(false); + $phpPath = $this->finder->find(true); if (false === $phpPath) { throw ParallelException::phpBinaryNotFound(); }
if (!$phpPath) {
if (false === $phpPath) {
throw ParallelException::phpBinaryNotFound();
}

Expand Down
4 changes: 2 additions & 2 deletions src/Result/ResultMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function listFailedTasks(): array
}

/**
* @throws ParallelException
* @throws ParallelException
*
* @return list<string>
*/
Expand Down Expand Up @@ -96,7 +96,7 @@ public function getResultCode(): int
*/
public function conclude(
callable $onSuccess,
callable $onFailure
callable $onFailure,
) {
$resultCode = $this->getResultCode();

Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/Scripts/ParallelScriptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ protected function setUp(): void
$finder->method('find')->willReturn('php');
$finder->method('findArguments')->willReturn([]);

// Composer comes with symfony console 2.8, which has deprecated methods:
// Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable,
// Since it's a composer dependency, we can't change it, so we need to suppress the deprecation notice
// Let's mute it for now.
$previousErrorLevel = error_reporting(0);
$this->io = new BufferIO();
error_reporting($previousErrorLevel);

$dispatcher = $this->createMock(EventDispatcher::class);
$dispatcher
Expand Down
Binary file modified tools/infection.phar
Binary file not shown.
Binary file modified tools/php-cs-fixer.phar
Binary file not shown.
Loading

0 comments on commit 76ab7e3

Please sign in to comment.