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

add symfony 7 #148

Merged
merged 1 commit into from
Feb 14, 2024
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
167 changes: 91 additions & 76 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,124 +6,139 @@ on:
branches:
- master
env:
LANG: "en_US.UTF-8"
LANG: "en_US.UTF-8"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]

name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
- run: composer install --no-progress
- run: vendor/bin/phpunit
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
- run: composer install --no-progress
- run: vendor/bin/phpunit

test_lowest_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none

- run: composer update --no-progress --prefer-lowest
- run: vendor/bin/phpunit
- run: composer update --no-progress --prefer-lowest
- run: vendor/bin/phpunit
test_symfony_34:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:3.4.* symfony/filesystem:3.4.*
- run: vendor/bin/phpunit
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:3.4.* symfony/filesystem:3.4.*
- run: vendor/bin/phpunit
test_symfony_40:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.3
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:4.0.* symfony/filesystem:4.0.*
- run: vendor/bin/phpunit
- uses: shivammathur/setup-php@v2
with:
php-version: 7.3
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:4.0.* symfony/filesystem:4.0.*
- run: vendor/bin/phpunit
test_symfony_44:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:4.4.* symfony/filesystem:4.4.*
- run: vendor/bin/phpunit
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:4.4.* symfony/filesystem:4.4.*
- run: vendor/bin/phpunit
test_symfony_5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:~5.0 symfony/filesystem:~5.0
- run: vendor/bin/phpunit
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:~5.0 symfony/filesystem:~5.0
- run: vendor/bin/phpunit
test_symfony_60:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:~6.0 symfony/filesystem:~6.0
- run: vendor/bin/phpunit
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:~6.0 symfony/filesystem:~6.0
- run: vendor/bin/phpunit
test_symfony_70:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none

- run: composer install
- run: composer require --no-interaction --prefer-source symfony/process:~7.0 symfony/filesystem:~7.0
- run: vendor/bin/phpunit
ecs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

- run: composer install --no-progress
- run: composer require symplify/easy-coding-standard --dev
- run: vendor/bin/ecs check --ansi
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

- run: composer install --no-progress
- run: composer require symplify/easy-coding-standard --dev
- run: vendor/bin/ecs check --ansi
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
],
"require": {
"php": ">=7.2",
"symfony/process": "~3.4|~4.0|~5.0|~6.0",
"symfony/filesystem": "~3.4|~4.0|~5.0|~6.0"
},
"symfony/process": "~3.4|~4.0|~5.0|~6.0|~7.0",
"symfony/filesystem": "~3.4|~4.0|~5.0|~6.0|~7.0"
},
"require-dev": {
"phpunit/phpunit": "~8.5",
"phpspec/prophecy": "^1.15"
Expand Down
22 changes: 5 additions & 17 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $ecsConfig): void {
$parameters = $ecsConfig->parameters();
$parameters->set(Option::PATHS, [__DIR__.'/src', __DIR__.'/tests']);

$ecsConfig->sets([SetList::PSR_12]);

$services = $ecsConfig->services();
$services->set(ConcatSpaceFixer::class)->call('configure', [[
'spacing' => 'none',
]]);

$services->set(BinaryOperatorSpacesFixer::class)->call('configure', [[
'operators' => ['=>' => 'align'],
]]);
};
return ECSConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withPreparedSets(true)
->withConfiguredRule(ConcatSpaceFixer::class, ['spacing' => 'none',])
->withConfiguredRule(BinaryOperatorSpacesFixer::class, ['operators' => ['=>' => 'align']]);
6 changes: 2 additions & 4 deletions tests/Runner/MediaInfoCommandRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public function testRunAsync()
$process = $this->prophesize(Process::class);
$process
->start()
->shouldBeCalled()
->willReturn($process);
->shouldBeCalled();

$process
->wait()
Expand Down Expand Up @@ -119,8 +118,7 @@ public function testRunAsyncFail()
$process = $this->prophesize(Process::class);
$process
->start()
->shouldBeCalled()
->willReturn($process);
->shouldBeCalled();

$process
->wait()
Expand Down
Loading