Skip to content

Commit d87990e

Browse files
committed
Add PHP 8.5 CI build and Symfony 8.0 support
1 parent 5cb26fe commit d87990e

4 files changed

Lines changed: 35 additions & 5 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,38 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: ['8.1', '8.2', '8.3', '8.4']
13-
symfony: ['5.4.*', '6.4.*', '7.3.*', '7.4.*@beta']
12+
php: ['8.1', '8.2', '8.3', '8.4', '8.5']
13+
symfony: ['5.4.*', '6.4.*', '7.3.*', '7.4.*@rc']
1414
pagerfanta: ['']
1515
composer-flags: ['--prefer-stable']
1616
can-fail: [false]
17+
with-jms: [true]
1718
with-twig: [true]
1819
include:
1920
# Run "no Twig" build on latest PHP and Symfony LTS
2021
- php: '8.4'
2122
symfony: '6.4.*'
2223
composer-flags: '--prefer-stable'
2324
can-fail: false
25+
with-jms: true
2426
with-twig: false
2527
- php: '8.1'
2628
symfony: '5.4.*'
2729
composer-flags: '--prefer-stable --prefer-lowest'
2830
can-fail: false
31+
with-jms: true
32+
with-twig: true
33+
- php: '8.5'
34+
symfony: '8.0.*@rc'
35+
composer-flags: '--prefer-stable'
36+
can-fail: true
37+
with-jms: false
2938
with-twig: true
3039
exclude:
3140
- php: '8.1'
3241
symfony: '7.3.*'
3342
- php: '8.1'
34-
symfony: '7.4.*@beta'
43+
symfony: '7.4.*@rc'
3544

3645
name: "PHP ${{ matrix.php }}${{ matrix.pagerfanta != '' && format(' - Pagerfanta {0}', matrix.pagerfanta) || '' }}${{ matrix.with-twig == false && ' - Without Twig' || '' }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
3746

@@ -59,6 +68,10 @@ jobs:
5968
composer require --no-update pagerfanta/core:${{ matrix.pagerfanta }}
6069
composer require --dev --no-update pagerfanta/twig:${{ matrix.pagerfanta }}
6170
71+
- name: Remove JMS Serializer
72+
if: matrix.with-jms == false
73+
run: composer remove --dev --no-update jms/serializer jms/serializer-bundle
74+
6275
- name: Remove Twig
6376
if: matrix.with-twig == false
6477
run: composer remove --dev --no-update pagerfanta/twig symfony/twig-bridge symfony/twig-bundle twig/twig

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
"description": "Bundle integrating Pagerfanta with Symfony",
55
"keywords": ["pagerfanta", "pagination", "symfony"],
66
"license": "MIT",
7+
"repositories": [
8+
{
9+
"type": "vcs",
10+
"url": "https://github.com/mbabker/SymfonyDependencyInjectionTest"
11+
}
12+
],
713
"require": {
814
"php": "^8.1",
915
"pagerfanta/core": "^3.7 || ^4.0",
@@ -18,7 +24,7 @@
1824
"require-dev": {
1925
"jms/serializer": "^3.18",
2026
"jms/serializer-bundle": "^4.2 || ^5.0",
21-
"matthiasnoback/symfony-dependency-injection-test": "^6.0",
27+
"matthiasnoback/symfony-dependency-injection-test": "dev-ci-updates as 6.1.0.1",
2228
"pagerfanta/twig": "^3.7 || ^4.0",
2329
"phpstan/extension-installer": "^1.3",
2430
"phpstan/phpstan": "2.1.32",
@@ -63,5 +69,5 @@
6369
"phpstan/extension-installer": true
6470
}
6571
},
66-
"minimum-stability": "dev"
72+
"minimum-stability": "rc"
6773
}

tests/DependencyInjection/BabDevPagerfantaExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ public function testContainerIsLoadedWithDefaultConfigurationWhenTwigBundleIsIns
155155

156156
public function testContainerIsLoadedWithDefaultConfigurationWhenJMSSerializerBundleIsInstalled(): void
157157
{
158+
if (!class_exists(JMSSerializerBundle::class)) {
159+
self::markTestSkipped('Test requires JMSSerializerBundle');
160+
}
161+
158162
$this->container->setParameter(
159163
'kernel.bundles',
160164
[

tests/Serializer/Handler/PagerfantaHandlerTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616

1717
final class PagerfantaHandlerTest extends TestCase
1818
{
19+
public static function setUpBeforeClass(): void
20+
{
21+
if (!class_exists(SerializerBuilder::class)) {
22+
self::markTestSkipped('Test requires JMS Serializer');
23+
}
24+
}
25+
1926
public function testSerializeToJson(): void
2027
{
2128
$pager = new Pagerfanta(new FixedAdapter(100, range(1, 5)));

0 commit comments

Comments
 (0)