Skip to content

Commit

Permalink
👷 test on PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Nov 3, 2024
1 parent 8e34781 commit e6f3847
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:

jobs:
phpstan:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
name: PHPStan
steps:
- name: Checkout
Expand All @@ -22,15 +22,15 @@ jobs:
composer install --ignore-platform-reqs
XDEBUG_MODE=off vendor/bin/phpstan
cs-fixer:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
twig-cs-fixer:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
name: Twig-CS-Fixer
steps:
- name: Checkout
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Run
run: vendor/bin/twig-cs-fixer lint templates
validate-markdown:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,7 +52,7 @@ jobs:
config: './.github/workflows/config/config.json'
args: './docs ./CONTRIBUTING.md ./README.md ./UPDATE.md'
tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
php:
Expand Down Expand Up @@ -89,6 +89,12 @@ jobs:
with_imagine: false
with_oneupbundle: false
max_deprecations: 0
- php: '8.4'
symfony: '7.2.*@dev'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 6
name: PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony }} tests with ${{ matrix.dependencies }} dependencies
steps:
- name: Checkout
Expand All @@ -111,6 +117,11 @@ jobs:
composer global require --no-interaction --no-progress symfony/flex:^2.2
composer config extra.symfony.require ${{ matrix.symfony }}
if: matrix.symfony != '*'
- name: use possible dev deps
if: contains(matrix.symfony, '@dev')
run: |
composer config minimum-stability dev
composer config prefer-stable true
- run: composer require --no-update liip/imagine-bundle:"^2.0"
if: matrix.with_imagine
- run: composer require --no-update oneup/flysystem-bundle:"^4.0.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/MappingDebugClassCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testUploadableClass(): void
public function testComplete(array $input, array $expectedSuggestions): void
{
if (!\class_exists(CommandCompletionTester::class)) {
$this->markTestSkipped('Test command completion requires symfony/console 5.4+.');
self::markTestSkipped('Test command completion requires symfony/console 5.4+.');
}

$reader = $this->mockMetadataReader();
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/MappingDebugCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testExistentMapping(): void
public function testComplete(array $input, array $expectedSuggestions): void
{
if (!\class_exists(CommandCompletionTester::class)) {
$this->markTestSkipped('Test command completion requires symfony/console 5.4+.');
self::markTestSkipped('Test command completion requires symfony/console 5.4+.');
}

$mappings = [
Expand Down
7 changes: 0 additions & 7 deletions tests/Metadata/Driver/AttributeReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@

final class AttributeReaderTest extends TestCase
{
protected function setUp(): void
{
if (\PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Tests for PHP 8 only');
}
}

public function testGetClassAnnotations(): void
{
$reader = new AttributeReader();
Expand Down
9 changes: 8 additions & 1 deletion tests/VichUploaderBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
*/
final class VichUploaderBundleTest extends TestCase
{
protected function setUp(): void
{
if (SimpleAppKernel::VERSION_ID >= 70200) { // @phpstan-ignore-line
self::markTestSkipped('Kernels above 7.1.0 are not supported in these tests');
}
}

public function testSimpleKernel(): void
{
$kernel = new SimpleAppKernel('test', true);
Expand Down Expand Up @@ -89,7 +96,7 @@ public function testFlysystemOfficialKernel(): void
public function testFlysystemOneUpKernel(): void
{
if (!\class_exists(OneupFlysystemBundle::class)) {
$this->markTestSkipped('OneupFlysystemBundle not installed');
self::markTestSkipped('OneupFlysystemBundle not installed');
}

$kernel = new FlysystemOneUpAppKernel('test', true);
Expand Down

0 comments on commit e6f3847

Please sign in to comment.