Skip to content

feat: drop support for php 8.0 #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2024
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
6 changes: 2 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,17 @@ jobs:
fail-fast: false
matrix:
include:
- description: 'No Symfony specified'
php: '8.0'
- description: 'No Symfony specified'
php: '8.1'
- description: 'No Symfony specified'
php: '8.2'
- 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'
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
19 changes: 11 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
colors="true"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd">
<coverage>
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd">

<testsuites>
<testsuite name="KnpMenuBundle Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>./src</directory>
</include>
<exclude>
<directory>./src/Resources</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="KnpMenuBundle Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
</source>

</phpunit>
5 changes: 2 additions & 3 deletions tests/DependencyInjection/Compiler/AddVotersPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,9 +42,7 @@ public function testProcessWithAlias(): void
);
}

/**
* @group legacy
*/
#[Group('legacy')]
public function testProcessRequestAware(): void
{
$containerBuilder = new ContainerBuilder();
Expand Down
5 changes: 2 additions & 3 deletions tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 2 additions & 3 deletions tests/DependencyInjection/KnpMenuExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion tests/Templating/MenuHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* @group legacy
*/
#[Group('legacy')]
class MenuHelperTest extends TestCase
{
public function testGet(): void
Expand Down