Skip to content

Commit ef6ed15

Browse files
authored
Merge pull request #471 from Chris53897/feature/drop-support-for-php-8
feat: drop support for php 8.0
2 parents 6acacf7 + 8a5b902 commit ef6ed15

File tree

8 files changed

+28
-25
lines changed

8 files changed

+28
-25
lines changed

.github/workflows/build.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,17 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- description: 'No Symfony specified'
32-
php: '8.0'
3331
- description: 'No Symfony specified'
3432
php: '8.1'
3533
- description: 'No Symfony specified'
3634
php: '8.2'
3735
- description: 'No Symfony specified'
3836
php: '8.3'
3937
- description: 'Lowest deps'
40-
php: '8.0'
38+
php: '8.1'
4139
composer_option: '--prefer-lowest'
4240
- description: 'Symfony 5.4'
43-
php: '8.0'
41+
php: '8.1'
4442
symfony: 5.4.*
4543
- description: 'Symfony 7'
4644
php: '8.2'

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 3.3.0 (2023-05-xx)
1+
## 3.4.0 (2024-xx-xx)
2+
3+
* Increased minimum PHP version to 8.1 (to be consistent with KnpMenu 3.5)
4+
5+
## 3.3.0 (2023-10-23)
26

37
* Increased minimum PHP version to 8.0 (to be consistent with KnpMenu 3.4)
48
* Dropped support for Symfony 3 and 4

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
}
2020
],
2121
"require": {
22-
"php": "^8.0",
22+
"php": "^8.1",
2323
"knplabs/knp-menu": "^3.3",
2424
"symfony/deprecation-contracts": "^2.5 | ^3.3",
2525
"symfony/framework-bundle": "^5.4 | ^6.0 | ^7.0"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^9.6 | ^10.1",
28+
"phpunit/phpunit": "^10.5 | ^11.0.3",
2929
"symfony/expression-language": "^5.4 | ^6.0 | ^7.0",
3030
"symfony/phpunit-bridge": "^6.0 | ^7.0",
3131
"symfony/templating": "^5.4 | ^6.0 | ^7.0"

phpunit.xml.dist

+11-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
colors="true"
44
bootstrap="vendor/autoload.php"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd">
6-
<coverage>
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd">
6+
7+
<testsuites>
8+
<testsuite name="KnpMenuBundle Test Suite">
9+
<directory>./tests/</directory>
10+
</testsuite>
11+
</testsuites>
12+
13+
<source>
714
<include>
815
<directory>./src</directory>
916
</include>
1017
<exclude>
1118
<directory>./src/Resources</directory>
1219
</exclude>
13-
</coverage>
14-
<testsuites>
15-
<testsuite name="KnpMenuBundle Test Suite">
16-
<directory suffix="Test.php">./tests/</directory>
17-
</testsuite>
18-
</testsuites>
20+
</source>
21+
1922
</phpunit>

tests/DependencyInjection/Compiler/AddVotersPassTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddVotersPass;
66
use Knp\Menu\Matcher\Matcher;
7+
use PHPUnit\Framework\Attributes\Group;
78
use PHPUnit\Framework\TestCase;
89
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
910
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -41,9 +42,7 @@ public function testProcessWithAlias(): void
4142
);
4243
}
4344

44-
/**
45-
* @group legacy
46-
*/
45+
#[Group('legacy')]
4746
public function testProcessRequestAware(): void
4847
{
4948
$containerBuilder = new ContainerBuilder();

tests/DependencyInjection/ConfigurationTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
namespace Knp\Bundle\MenuBundle\Tests\DependencyInjection;
44

5+
use PHPUnit\Framework\Attributes\DataProvider;
56
use PHPUnit\Framework\TestCase;
67

78
class ConfigurationTest extends TestCase
89
{
9-
/**
10-
* @dataProvider getConfigs
11-
*/
10+
#[DataProvider('getConfigs')]
1211
public function testConfigurationMatchesXsd($config): void
1312
{
1413
$configDom = new \DOMDocument();

tests/DependencyInjection/KnpMenuExtensionTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Knp\Bundle\MenuBundle\Tests\DependencyInjection;
44

55
use Knp\Bundle\MenuBundle\DependencyInjection\KnpMenuExtension;
6+
use PHPUnit\Framework\Attributes\Group;
67
use PHPUnit\Framework\TestCase;
78
use Symfony\Component\DependencyInjection\ContainerBuilder;
89

@@ -47,9 +48,7 @@ public function testDisableTwig(): void
4748
$this->assertFalse($container->hasDefinition('knp_menu.renderer.twig'));
4849
}
4950

50-
/**
51-
* @group legacy
52-
*/
51+
#[Group('legacy')]
5352
public function testEnablePhpTemplates(): void
5453
{
5554
$container = new ContainerBuilder();

tests/Templating/MenuHelperTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
use Knp\Bundle\MenuBundle\Templating\Helper\MenuHelper;
66
use Knp\Menu\ItemInterface;
7+
use PHPUnit\Framework\Attributes\Group;
78
use PHPUnit\Framework\TestCase;
89

910
/**
1011
* Test for MenuHelper class.
1112
*
1213
* @author Leszek Prabucki <[email protected]>
13-
* @group legacy
1414
*/
15+
#[Group('legacy')]
1516
class MenuHelperTest extends TestCase
1617
{
1718
public function testGet(): void

0 commit comments

Comments
 (0)