Skip to content

Commit

Permalink
Bump to symfony ^6.4 || ^7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Feb 4, 2024
1 parent 452cb88 commit a4b31d9
Show file tree
Hide file tree
Showing 13 changed files with 674 additions and 818 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ jobs:
with:
PHP_EXTENSIONS: "mbstring, json, mongodb"
SYMFONY_KERNEL: "Nucleos\\UserAdminBundle\\Tests\\App\\AppKernel"
SYMFONY_VERSIONS: "6.4,7.0"
secrets:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
40 changes: 20 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@
"psr/log": "^1.0 || ^2.0 || ^3.0",
"sonata-project/admin-bundle": "^4.8.1",
"sonata-project/doctrine-extensions": "^1.5.1 || ^2.0.0",
"symfony/asset": "^5.4 || ^6.0",
"symfony/config": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/event-dispatcher": "^5.4 || ^6.0",
"symfony/asset": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/event-dispatcher": "^6.4 || ^7.0",
"symfony/event-dispatcher-contracts": "^1.0 || ^2.0 || ^3.0",
"symfony/form": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4.19 || ^6.2.5",
"symfony/http-foundation": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/options-resolver": "^5.4 || ^6.0",
"symfony/routing": "^5.4 || ^6.0",
"symfony/form": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-foundation": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/options-resolver": "^6.4 || ^7.0",
"symfony/routing": "^6.4 || ^7.0",
"symfony/security-acl": "^3.0",
"symfony/security-core": "^5.4 || ^6.0",
"symfony/security-csrf": "^5.4 || ^6.0",
"symfony/security-http": "^5.4 || ^6.0",
"symfony/translation": "^5.4 || ^6.0",
"symfony/security-core": "^6.4 || ^7.0",
"symfony/security-csrf": "^6.4 || ^7.0",
"symfony/security-http": "^6.4 || ^7.0",
"symfony/translation": "^6.4 || ^7.0",
"symfony/translation-contracts": "^1.0 || ^2.0 || ^3.0",
"symfony/twig-bridge": "^5.4 || ^6.0",
"symfony/twig-bundle": "^5.4 || ^6.0",
"symfony/twig-bridge": "^6.4 || ^7.0",
"symfony/twig-bundle": "^6.4 || ^7.0",
"twig/extra-bundle": "^3.0",
"twig/twig": "^2.14 || ^3.1"
},
Expand All @@ -73,10 +73,10 @@
"knplabs/knp-menu-bundle": "^3.2",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"sonata-project/form-extensions": "^1.20 || ^2.0",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/doctrine-bridge": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/yaml": "^5.4 || ^6.0"
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/doctrine-bridge": "^6.4 || ^7.0",
"symfony/intl": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0"
},
"conflict": {
"doctrine/doctrine-bundle": "<2.5",
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/Document/GroupAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

use Nucleos\UserAdminBundle\Admin\Model\GroupAdmin as BaseGroupAdmin;

final class GroupAdmin extends BaseGroupAdmin
{
}
final class GroupAdmin extends BaseGroupAdmin {}
4 changes: 1 addition & 3 deletions src/Admin/Document/UserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

use Nucleos\UserAdminBundle\Admin\Model\UserAdmin as BaseUserAdmin;

final class UserAdmin extends BaseUserAdmin
{
}
final class UserAdmin extends BaseUserAdmin {}
4 changes: 1 addition & 3 deletions src/Admin/Entity/GroupAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

use Nucleos\UserAdminBundle\Admin\Model\GroupAdmin as BaseGroupAdmin;

final class GroupAdmin extends BaseGroupAdmin
{
}
final class GroupAdmin extends BaseGroupAdmin {}
4 changes: 1 addition & 3 deletions src/Admin/Entity/UserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

use Nucleos\UserAdminBundle\Admin\Model\UserAdmin as BaseUserAdmin;

final class UserAdmin extends BaseUserAdmin
{
}
final class UserAdmin extends BaseUserAdmin {}
4 changes: 1 addition & 3 deletions src/Security/RolesBuilder/AdminRolesBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@

namespace Nucleos\UserAdminBundle\Security\RolesBuilder;

interface AdminRolesBuilderInterface extends RolesBuilderInterface, PermissionLabelsBuilderInterface
{
}
interface AdminRolesBuilderInterface extends RolesBuilderInterface, PermissionLabelsBuilderInterface {}
4 changes: 1 addition & 3 deletions src/Security/RolesBuilder/MatrixRolesBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@

namespace Nucleos\UserAdminBundle\Security\RolesBuilder;

interface MatrixRolesBuilderInterface extends ExpandableRolesBuilderInterface, PermissionLabelsBuilderInterface
{
}
interface MatrixRolesBuilderInterface extends ExpandableRolesBuilderInterface, PermissionLabelsBuilderInterface {}
8 changes: 4 additions & 4 deletions tests/Action/LoginActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static function (string $message): string {
}

/**
* @dataProvider userGrantedAdminProvider
* @dataProvider provideUserGrantedAdminCases
*/
public function testUserGrantedAdmin(string $referer, string $expectedRedirectUrl): void
{
Expand Down Expand Up @@ -189,7 +189,7 @@ public function testUserGrantedAdmin(string $referer, string $expectedRedirectUr
/**
* @return string[][]
*/
public static function userGrantedAdminProvider(): array
public static function provideUserGrantedAdminCases(): iterable
{
return [
['', '/foo'],
Expand All @@ -199,7 +199,7 @@ public static function userGrantedAdminProvider(): array
}

/**
* @dataProvider unauthenticatedProvider
* @dataProvider provideUnauthenticatedCases
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
Expand Down Expand Up @@ -311,7 +311,7 @@ static function (string $key) use ($sessionParameters): bool {
self::assertSame('template content', $result->getContent());
}

public static function unauthenticatedProvider(): array
public static function provideUnauthenticatedCases(): iterable

Check failure on line 314 in tests/Action/LoginActionTest.php

View workflow job for this annotation

GitHub Actions / run / Static Code Analysis (8.3)

Method Nucleos\UserAdminBundle\Tests\Action\LoginActionTest::provideUnauthenticatedCases() return type has no value type specified in iterable type iterable.
{
$error = new AuthenticationException('An error');

Expand Down
10 changes: 9 additions & 1 deletion tests/App/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Nucleos\UserAdminBundle\Tests\App\Entity\Group;
use Nucleos\UserAdminBundle\Tests\App\Entity\User;
use Nucleos\UserBundle\Model\UserInterface;
use Symfony\Component\Security\Http\Attribute\IsGranted;

return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('framework', ['secret' => 'MySecret']);
Expand Down Expand Up @@ -62,7 +63,14 @@
],
]);

$containerConfigurator->extension('security', ['enable_authenticator_manager' => true]);
$securityConfig = [];

// TODO: Remove if when dropping support of Symfony 5.4
if (!class_exists(IsGranted::class)) {
$securityConfig['enable_authenticator_manager'] = true;
}

$containerConfigurator->extension('security', $securityConfig);

$containerConfigurator->extension('security', ['access_control' => [['path' => '^/.*', 'role' => 'PUBLIC_ACCESS']]]);

Expand Down
4 changes: 2 additions & 2 deletions tests/Resources/XliffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function setUp(): void
}

/**
* @dataProvider getXliffPaths
* @dataProvider provideXliffCases
*/
public function testXliff(string $path): void
{
Expand All @@ -45,7 +45,7 @@ public function testXliff(string $path): void
/**
* @return string[][]
*/
public static function getXliffPaths(): array
public static function provideXliffCases(): iterable
{
return [[__DIR__.'/../../src/Resources/translations']];
}
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"phpunit/phpunit": "^10.1.2",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^5.0.3",
"symfony/phpunit-bridge": "^6.2.7",
"symfony/phpunit-bridge": "^7.0",
"vimeo/psalm": "^5.9"
},
"config": {
Expand Down
Loading

0 comments on commit a4b31d9

Please sign in to comment.