diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e75d6a48..7199791f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,8 +28,6 @@ jobs: fail-fast: false matrix: include: - - description: 'No Symfony specified' - php: '8.0' - description: 'No Symfony specified' php: '8.1' - description: 'No Symfony specified' @@ -37,10 +35,10 @@ jobs: - description: 'No Symfony specified' php: '8.3' - description: 'Lowest deps' - php: '8.0' + php: '8.1' composer_option: '--prefer-lowest' - description: 'Symfony 5.4' - php: '8.0' + php: '8.1' symfony: 5.4.* - description: 'Symfony 7' php: '8.2' diff --git a/CHANGELOG.md b/CHANGELOG.md index 4889e875..fbb6b3a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## 3.3.0 (2023-05-xx) +## 3.4.0 (2024-xx-xx) + +* Increased minimum PHP version to 8.1 (to be consistent with KnpMenu 3.5) + +## 3.3.0 (2023-10-23) * Increased minimum PHP version to 8.0 (to be consistent with KnpMenu 3.4) * Dropped support for Symfony 3 and 4 diff --git a/composer.json b/composer.json index ddb8a133..76fc9ba7 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ } ], "require": { - "php": "^8.0", + "php": "^8.1", "knplabs/knp-menu": "^3.3", "symfony/deprecation-contracts": "^2.5 | ^3.3", "symfony/framework-bundle": "^5.4 | ^6.0 | ^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.6 | ^10.1", + "phpunit/phpunit": "^10.5 | ^11.0.3", "symfony/expression-language": "^5.4 | ^6.0 | ^7.0", "symfony/phpunit-bridge": "^6.0 | ^7.0", "symfony/templating": "^5.4 | ^6.0 | ^7.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 95b0a99c..44402926 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,18 +2,21 @@ - + xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"> + + + + ./tests/ + + + + ./src ./src/Resources - - - - ./tests/ - - + + diff --git a/tests/DependencyInjection/Compiler/AddVotersPassTest.php b/tests/DependencyInjection/Compiler/AddVotersPassTest.php index b8e967a7..cf0f9a12 100644 --- a/tests/DependencyInjection/Compiler/AddVotersPassTest.php +++ b/tests/DependencyInjection/Compiler/AddVotersPassTest.php @@ -4,6 +4,7 @@ use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddVotersPass; use Knp\Menu\Matcher\Matcher; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -41,9 +42,7 @@ public function testProcessWithAlias(): void ); } - /** - * @group legacy - */ + #[Group('legacy')] public function testProcessRequestAware(): void { $containerBuilder = new ContainerBuilder(); diff --git a/tests/DependencyInjection/ConfigurationTest.php b/tests/DependencyInjection/ConfigurationTest.php index da91d8ca..46531e07 100644 --- a/tests/DependencyInjection/ConfigurationTest.php +++ b/tests/DependencyInjection/ConfigurationTest.php @@ -2,13 +2,12 @@ namespace Knp\Bundle\MenuBundle\Tests\DependencyInjection; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class ConfigurationTest extends TestCase { - /** - * @dataProvider getConfigs - */ + #[DataProvider('getConfigs')] public function testConfigurationMatchesXsd($config): void { $configDom = new \DOMDocument(); diff --git a/tests/DependencyInjection/KnpMenuExtensionTest.php b/tests/DependencyInjection/KnpMenuExtensionTest.php index e5145c80..e135004a 100644 --- a/tests/DependencyInjection/KnpMenuExtensionTest.php +++ b/tests/DependencyInjection/KnpMenuExtensionTest.php @@ -3,6 +3,7 @@ namespace Knp\Bundle\MenuBundle\Tests\DependencyInjection; use Knp\Bundle\MenuBundle\DependencyInjection\KnpMenuExtension; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -47,9 +48,7 @@ public function testDisableTwig(): void $this->assertFalse($container->hasDefinition('knp_menu.renderer.twig')); } - /** - * @group legacy - */ + #[Group('legacy')] public function testEnablePhpTemplates(): void { $container = new ContainerBuilder(); diff --git a/tests/Templating/MenuHelperTest.php b/tests/Templating/MenuHelperTest.php index 825af0dd..44c19e1e 100644 --- a/tests/Templating/MenuHelperTest.php +++ b/tests/Templating/MenuHelperTest.php @@ -4,14 +4,15 @@ use Knp\Bundle\MenuBundle\Templating\Helper\MenuHelper; use Knp\Menu\ItemInterface; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; /** * Test for MenuHelper class. * * @author Leszek Prabucki - * @group legacy */ +#[Group('legacy')] class MenuHelperTest extends TestCase { public function testGet(): void