From b064ec7c5af6ef5bde83aaa2e22d2ee220bfee9f Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:06:25 +0200 Subject: [PATCH 1/8] Allow composer plugins --- vendor-bin/tools/composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor-bin/tools/composer.json b/vendor-bin/tools/composer.json index d6fa94b5..244e6b6f 100644 --- a/vendor-bin/tools/composer.json +++ b/vendor-bin/tools/composer.json @@ -20,6 +20,9 @@ "vimeo/psalm": "^4.13" }, "config": { + "allow-plugins": { + "phpstan/extension-installer": true + }, "bin-dir": "../../vendor/bin", "platform": { "php": "8.0.2" From 7d0513a6f0294eff3c810cfce572c76d78946690 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:40:46 +0200 Subject: [PATCH 2/8] Fix docs build --- docs/requirements.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index b7bfdbef..59728407 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,5 @@ -Sphinx==1.8.5 -git+https://github.com/fabpot/sphinx-php.git -sphinx_rtd_theme +Pygments==2.9.0 +sphinx==1.8.5 +git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php +sphinx_rtd_theme==0.5.2 +jinja2==3.0.3 From 7cfd86a64275a692c5931e41a10202aa9b8821e3 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:15:17 +0200 Subject: [PATCH 3/8] Fix CS --- src/DependencyInjection/Configuration.php | 4 ++-- src/Security/RolesBuilder/SecurityRolesBuilder.php | 2 +- tests/Action/AdminsTest.php | 8 ++++++++ tests/App/AppKernel.php | 12 ++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 2727f952..9dcb7fee 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -89,7 +89,7 @@ private function addAdminSection(NodeDefinition $node): void ->end() ->end() ->end() - ; + ; } private function addAvatarSection(NodeDefinition $node): void @@ -104,6 +104,6 @@ private function addAvatarSection(NodeDefinition $node): void ->end() ->end() ->end() - ; + ; } } diff --git a/src/Security/RolesBuilder/SecurityRolesBuilder.php b/src/Security/RolesBuilder/SecurityRolesBuilder.php index d20124d5..41c38fe1 100644 --- a/src/Security/RolesBuilder/SecurityRolesBuilder.php +++ b/src/Security/RolesBuilder/SecurityRolesBuilder.php @@ -128,7 +128,7 @@ private function getSecurityRoles(array $hierarchy, array $roles, ?string $domai $securityRoles = []; foreach ($roles as $role) { if (!\array_key_exists($role, $hierarchy) && !isset($securityRoles[$role]) - && !$this->recursiveArraySearch($role, $securityRoles)) { + && !$this->recursiveArraySearch($role, $securityRoles)) { $securityRoles[$role] = $this->getSecurityRole($role, $domain); } } diff --git a/tests/Action/AdminsTest.php b/tests/Action/AdminsTest.php index be29cb47..69fb6ec5 100644 --- a/tests/Action/AdminsTest.php +++ b/tests/Action/AdminsTest.php @@ -44,15 +44,23 @@ public function testCrudUrls(string $url): void public static function provideCrudUrlsCases(): iterable { yield 'List User' => ['/admin/tests/app/user/list']; + yield 'Create User' => ['/admin/tests/app/user/create']; + yield 'Edit User' => ['/admin/tests/app/user/1/edit']; + yield 'Show User' => ['/admin/tests/app/user/1/show']; + yield 'Delete User' => ['/admin/tests/app/user/1/delete']; yield 'List group' => ['/admin/tests/app/group/list']; + yield 'Create group' => ['/admin/tests/app/group/create']; + yield 'Edit group' => ['/admin/tests/app/group/1/edit']; + yield 'Show group' => ['/admin/tests/app/group/1/show']; + yield 'Delete group' => ['/admin/tests/app/group/1/delete']; } diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index d8a4e668..88b55ea4 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -43,17 +43,29 @@ public function __construct() public function registerBundles(): iterable { yield new FrameworkBundle(); + yield new TwigBundle(); + yield new TwigExtraBundle(); + yield new SecurityBundle(); + yield new DoctrineBundle(); + yield new KnpMenuBundle(); + yield new SonataBlockBundle(); + yield new SonataAdminBundle(); + yield new SonataDoctrineORMAdminBundle(); + yield new SonataDoctrineBundle(); + yield new SonataTwigBundle(); + yield new NucleosUserBundle(); + yield new NucleosUserAdminBundle(); } From 398988c0f5e84e111d9728a2a547d69a6b694489 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:15:41 +0200 Subject: [PATCH 4/8] Update phpstan / psalm baseline --- phpstan-baseline.neon | 48 +++++++++++++++++++++++++++++++++++++++---- psalm-baseline.xml | 32 ++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 919abbdb..e63343ac 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,11 +5,41 @@ parameters: count: 1 path: src/Admin/Model/GroupAdmin.php + - + message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\\\|Nucleos\\\\UserBundle\\\\Model\\\\GroupManager is not subtype of native type string\\|null\\.$#" + count: 1 + path: src/Admin/Model/GroupAdmin.php + + - + message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\\\:\\:__construct\\(\\) expects class\\-string\\\\|null, string\\|null given\\.$#" + count: 1 + path: src/Admin/Model/GroupAdmin.php + + - + message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager \\(Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\|null\\.$#" + count: 1 + path: src/Admin/Model/GroupAdmin.php + - message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager with generic interface Nucleos\\\\UserBundle\\\\Model\\\\GroupManager does not specify its types\\: GroupTemplate$#" count: 1 path: src/Admin/Model/GroupAdmin.php + - + message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\\\|Nucleos\\\\UserBundle\\\\Model\\\\UserManager is not subtype of native type string\\|null\\.$#" + count: 1 + path: src/Admin/Model/UserAdmin.php + + - + message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\\\:\\:__construct\\(\\) expects class\\-string\\\\|null, string\\|null given\\.$#" + count: 1 + path: src/Admin/Model/UserAdmin.php + + - + message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\UserAdmin\\:\\:\\$userManager \\(Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\|null\\.$#" + count: 1 + path: src/Admin/Model/UserAdmin.php + - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" count: 4 @@ -71,7 +101,7 @@ parameters: path: src/Security/EditableRolesBuilder.php - - message: "#^Call to function is_array\\(\\) with array\\, route\\: string, route_absolute\\: bool, route_params\\: array\\\\}\\> will always evaluate to true\\.$#" + message: "#^Call to function is_array\\(\\) with array\\, route_absolute\\: bool, route_params\\: array\\\\}\\|array\\{label\\: string, roles\\: array\\, route\\: string, route_absolute\\: bool, route_params\\: array\\\\}\\> will always evaluate to true\\.$#" count: 1 path: src/Security/RolesBuilder/AdminRolesBuilder.php @@ -95,6 +125,11 @@ parameters: count: 1 path: src/Security/RolesBuilder/AdminRolesBuilder.php + - + message: "#^Parameter \\#1 \\$items of method Nucleos\\\\UserAdminBundle\\\\Security\\\\RolesBuilder\\\\AdminRolesBuilder\\:\\:hasGroupAdmin\\(\\) expects array\\, array\\\\|bool\\|string\\>\\> given\\.$#" + count: 1 + path: src/Security/RolesBuilder/AdminRolesBuilder.php + - message: "#^Method Nucleos\\\\UserAdminBundle\\\\Security\\\\RolesBuilder\\\\ExpandableRolesBuilderInterface\\:\\:getExpandedRoles\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -120,6 +155,11 @@ parameters: count: 1 path: tests/Action/LoginActionTest.php + - + message: "#^Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\Security\\\\\\\\Core\\\\\\\\User\\\\\\\\UserProviderInterface' and 'loadUserByIdentifier' will always evaluate to true\\.$#" + count: 1 + path: tests/Action/SendEmailActionTest.php + - message: "#^Method Nucleos\\\\UserAdminBundle\\\\Tests\\\\Fixtures\\\\PoolMockFactory\\:\\:create\\(\\) has parameter \\$adminServiceIds with generic interface Sonata\\\\AdminBundle\\\\Admin\\\\AdminInterface but does not specify its types\\: T$#" count: 1 @@ -131,12 +171,12 @@ parameters: path: tests/Resources/XliffTest.php - - message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\, \\.\\.\\.\\}, array\\{\\} given\\.$#" + message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{\\} given\\.$#" count: 3 path: tests/Security/Authorization/Voter/EditableRolesBuilderTest.php - - message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\, \\.\\.\\.\\}, array\\{\\} given\\.$#" + message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{\\} given\\.$#" count: 1 path: tests/Security/RolesBuilder/AdminRolesBuilderTest.php @@ -151,7 +191,7 @@ parameters: path: tests/Security/RolesBuilder/AdminRolesBuilderTest.php - - message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\, \\.\\.\\.\\}, array\\{role_super_admin\\: 'ROLE_SUPER_ADMIN', role_admin\\: 'ROLE_SONATA_ADMIN'\\} given\\.$#" + message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{role_super_admin\\: 'ROLE_SUPER_ADMIN', role_admin\\: 'ROLE_SONATA_ADMIN'\\} given\\.$#" count: 1 path: tests/Security/RolesBuilder/SecurityRolesBuilderTest.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 53eb247e..d3b4b9fa 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,10 +1,37 @@ - + $username + + + getFlashBag + + + + + GroupManager|class-string<GroupInterface> + + + $class + + + $groupManager + + + + + UserManager|class-string<UserInterface> + + + $class + + + $userManager + + children @@ -41,6 +68,9 @@ string[] + + $groupData['items'] + From b57e5515a4d727964f3b2d85dbde9370c47ac87d Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:32:29 +0200 Subject: [PATCH 5/8] Fix admin service construction --- src/Admin/Model/GroupAdmin.php | 9 ++------- src/Admin/Model/UserAdmin.php | 9 ++------- tests/Admin/Entity/GroupAdminTest.php | 5 ----- tests/Admin/Entity/UserAdminTest.php | 5 ----- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/Admin/Model/GroupAdmin.php b/src/Admin/Model/GroupAdmin.php index 08113e1c..b367d33c 100644 --- a/src/Admin/Model/GroupAdmin.php +++ b/src/Admin/Model/GroupAdmin.php @@ -28,14 +28,9 @@ abstract class GroupAdmin extends AbstractAdmin { private GroupManager $groupManager; - /** - * @phpstan-param GroupManager|class-string $class - * - * @param mixed $codeOrGroupManager - */ - public function __construct($codeOrGroupManager, string $class = null, string $baseControllerName = null, GroupManager $groupManager = null) + public function __construct(GroupManager $groupManager) { - parent::__construct($codeOrGroupManager, $class, $baseControllerName); + parent::__construct(); $this->groupManager = $groupManager; } diff --git a/src/Admin/Model/UserAdmin.php b/src/Admin/Model/UserAdmin.php index 378a6861..8ab4d576 100644 --- a/src/Admin/Model/UserAdmin.php +++ b/src/Admin/Model/UserAdmin.php @@ -35,14 +35,9 @@ abstract class UserAdmin extends AbstractAdmin { protected UserManager $userManager; - /** - * @phpstan-param UserManager|class-string $class - * - * @param mixed $codeOrUserManager - */ - public function __construct($codeOrUserManager, string $class = null, string $baseControllerName = null, UserManager $userManager = null) + public function __construct(UserManager $userManager) { - parent::__construct($codeOrUserManager, $class, $baseControllerName); + parent::__construct(); $this->userManager = $userManager; } diff --git a/tests/Admin/Entity/GroupAdminTest.php b/tests/Admin/Entity/GroupAdminTest.php index 86b1aadd..d8b9752b 100644 --- a/tests/Admin/Entity/GroupAdminTest.php +++ b/tests/Admin/Entity/GroupAdminTest.php @@ -14,19 +14,14 @@ namespace Nucleos\UserAdminBundle\Tests\Admin\Entity; use Nucleos\UserAdminBundle\Admin\Entity\GroupAdmin; -use Nucleos\UserBundle\Model\Group; use Nucleos\UserBundle\Model\GroupManager; use PHPUnit\Framework\TestCase; -use Sonata\AdminBundle\Controller\CRUDController; final class GroupAdminTest extends TestCase { public function testInstance(): void { $admin = new GroupAdmin( - 'admin.group', - Group::class, - CRUDController::class, $this->createMock(GroupManager::class) ); diff --git a/tests/Admin/Entity/UserAdminTest.php b/tests/Admin/Entity/UserAdminTest.php index 95ee4274..5d4fff6d 100644 --- a/tests/Admin/Entity/UserAdminTest.php +++ b/tests/Admin/Entity/UserAdminTest.php @@ -14,19 +14,14 @@ namespace Nucleos\UserAdminBundle\Tests\Admin\Entity; use Nucleos\UserAdminBundle\Admin\Entity\UserAdmin; -use Nucleos\UserAdminBundle\Tests\App\Entity\User; use Nucleos\UserBundle\Model\UserManager; use PHPUnit\Framework\TestCase; -use Sonata\AdminBundle\Controller\CRUDController; final class UserAdminTest extends TestCase { public function testInstance(): void { $admin = new UserAdmin( - 'admin.group', - User::class, - CRUDController::class, $this->createMock(UserManager::class) ); From 9e37d6d2037d44f102b2a2fdbbe42e03df62e75d Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:45:44 +0200 Subject: [PATCH 6/8] Fix tests --- composer.json | 7 ++++--- tests/Action/SendEmailActionTest.php | 2 +- tests/App/AppKernel.php | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 77a88409..8518c2ec 100644 --- a/composer.json +++ b/composer.json @@ -66,18 +66,19 @@ "twig/twig": "^2.14 || ^3.1" }, "require-dev": { - "doctrine/doctrine-bundle": "^1.12 || ^2.0", + "doctrine/doctrine-bundle": "^2.5", "doctrine/orm": "^2.7", "ergebnis/composer-normalize": "^2.0.1", - "knplabs/knp-menu": "^2.3 || ^3.0", + "knplabs/knp-menu": "^3.2", "sonata-project/doctrine-orm-admin-bundle": "^4.0", + "sonata-project/form-extensions": "^1.18", "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" }, "conflict": { - "doctrine/doctrine-bundle": "<1.12", + "doctrine/doctrine-bundle": "<2.5", "doctrine/orm": "<2.7", "symfony/doctrine-bridge": "<5.4" }, diff --git a/tests/Action/SendEmailActionTest.php b/tests/Action/SendEmailActionTest.php index 3c63ba36..41a3230a 100644 --- a/tests/Action/SendEmailActionTest.php +++ b/tests/Action/SendEmailActionTest.php @@ -70,7 +70,7 @@ protected function setUp(): void $this->mailer = $this->createMock(ResettingMailer::class); $this->tokenGenerator = $this->createMock(TokenGenerator::class); - if (method_exists(UserProviderInterface::class, 'loadUserByIdentifier')) { + if (!method_exists(UserProviderInterface::class, 'loadUserByIdentifier')) { $this->userProvider = $this->getMockBuilder(UserProviderInterface::class) ->addMethods(['loadUserByIdentifier']) ->getMockForAbstractClass() diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index 88b55ea4..33ed2a71 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -21,6 +21,7 @@ use Sonata\BlockBundle\SonataBlockBundle; use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle; use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle; +use Sonata\Form\Bridge\Symfony\SonataFormBundle; use Sonata\Twig\Bridge\Symfony\SonataTwigBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; @@ -62,6 +63,8 @@ public function registerBundles(): iterable yield new SonataDoctrineBundle(); + yield new SonataFormBundle(); + yield new SonataTwigBundle(); yield new NucleosUserBundle(); From 14edcb25074ddb5af04a11aea3889c85778fcf12 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:55:38 +0200 Subject: [PATCH 7/8] Clean phpstan baseline --- phpstan-baseline.neon | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e63343ac..49e5da33 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,41 +5,11 @@ parameters: count: 1 path: src/Admin/Model/GroupAdmin.php - - - message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\\\|Nucleos\\\\UserBundle\\\\Model\\\\GroupManager is not subtype of native type string\\|null\\.$#" - count: 1 - path: src/Admin/Model/GroupAdmin.php - - - - message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\\\:\\:__construct\\(\\) expects class\\-string\\\\|null, string\\|null given\\.$#" - count: 1 - path: src/Admin/Model/GroupAdmin.php - - - - message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager \\(Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\|null\\.$#" - count: 1 - path: src/Admin/Model/GroupAdmin.php - - message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager with generic interface Nucleos\\\\UserBundle\\\\Model\\\\GroupManager does not specify its types\\: GroupTemplate$#" count: 1 path: src/Admin/Model/GroupAdmin.php - - - message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\\\|Nucleos\\\\UserBundle\\\\Model\\\\UserManager is not subtype of native type string\\|null\\.$#" - count: 1 - path: src/Admin/Model/UserAdmin.php - - - - message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\\\:\\:__construct\\(\\) expects class\\-string\\\\|null, string\\|null given\\.$#" - count: 1 - path: src/Admin/Model/UserAdmin.php - - - - message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\UserAdmin\\:\\:\\$userManager \\(Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\|null\\.$#" - count: 1 - path: src/Admin/Model/UserAdmin.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" count: 4 From 8414bbb88ca68195cf1e86a68cdad6fabb6992a9 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:59:17 +0200 Subject: [PATCH 8/8] Ignore phpmd error --- tests/Action/RequestActionTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Action/RequestActionTest.php b/tests/Action/RequestActionTest.php index 74761161..278c52a6 100644 --- a/tests/Action/RequestActionTest.php +++ b/tests/Action/RequestActionTest.php @@ -89,6 +89,9 @@ public function testAuthenticated(): void static::assertSame('/foo', $result->getTargetUrl()); } + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function testUnauthenticated(): void { $request = new Request();