Skip to content
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
45 changes: 18 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: PHPStan
uses: docker://oskarstark/phpstan-ga
env:
Expand All @@ -24,7 +24,7 @@ jobs:
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
with:
Expand All @@ -35,44 +35,35 @@ jobs:
fail-fast: false
matrix:
include:
- description: 'Symfony 6.4'
- description: 'Lowest'
php: '8.2'
symfony: '6.4.*'
composer_option: '--prefer-lowest'
- description: 'Symfony 7.3'
php: '8.3'
symfony: '7.3.*'
symfony: 6.4.*
dependencies: lowest
- description: 'Symfony 7.4'
php: '8.4'
symfony: '7.4.*@dev'
symfony: 7.4.*
- description: 'Symfony 8.0'
php: '8.5'
symfony: '8.0.*@dev'
symfony: 8.0.*
name: PHP ${{ matrix.php }} tests (${{ matrix.description }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.composer_option }}
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: require specific Symfony version
if: matrix.symfony
run: |
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json;
- name: use possible dev deps
tools: flex
- name: Allow dev dependencies
run: composer config minimum-stability dev && composer config prefer-stable true
if: contains(matrix.symfony, '@dev')
run: |
composer config minimum-stability dev
composer config prefer-stable true
- name: update vendors
run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }}
- name: run tests
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Run tests
run: bin/phpunit --colors=always --coverage-clover=clover.xml
- name: save test coverage
if: ${{ matrix.php == '8.4' }}
Expand Down
8 changes: 4 additions & 4 deletions tests/Test/WebTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testSaveOutput(): void
self::$container
->method('getParameter')
->willReturnCallback(
function (string $parameter): string {
static function (string $parameter): string {
return match ($parameter) {
'beelab_test.browser' => 'test',
'kernel.project_dir' => vfsStream::url('proj'),
Expand Down Expand Up @@ -99,7 +99,7 @@ public function testLogin(): void
self::$container
->method('has')
->willReturnCallback(
function (string $service): bool {
static function (string $service): bool {
return match ($service) {
'session.factory', 'test.session.factory' => false,
'session' => true,
Expand All @@ -111,7 +111,7 @@ function (string $service): bool {
self::$container
->method('get')
->willReturnCallback(
function (string $service) use ($repository, $session): ?object {
static function (string $service) use ($repository, $session): ?object {
return match ($service) {
'beelab_user.manager' => $repository,
'session' => $session,
Expand Down Expand Up @@ -149,7 +149,7 @@ public function testLoginWithUserNotFound(): void
self::$container
->method('get')
->willReturnCallback(
function (string $service) use ($repository, $session): ?object {
static function (string $service) use ($repository, $session): ?object {
return match ($service) {
'beelab_user.manager' => $repository,
'session' => $session,
Expand Down