Enable security information mapping for RoleSecurityHandler #7952
Annotations
12 errors
InvalidReturnType:
tests/Security/Handler/RoleSecurityHandlerTest.php#L104
tests/Security/Handler/RoleSecurityHandlerTest.php:104:24: InvalidReturnType: The declared return type 'iterable<mixed, list{string, string}>' for Sonata\AdminBundle\Tests\Security\Handler\RoleSecurityHandlerTest::provideIsGrantedWithSecurityInformationCases is incorrect, got 'Generator<'default mapping'|'with all mapping'|'with missing permission'|'with multiple mappings'|'with single mapping', list{array{ADMIN?: list{'ALL'}, MANAGE?: list{'EDIT', 'SHOW', 'DELETE'}, SHOW?: list{'VIEW', 'SHOW'}, VIEW?: list{'EDIT', 'SHOW'}, WRITE?: list{'EDIT', 'SHOW'}}, list{'ROLE_TEST_ALL'|'ROLE_TEST_EDIT'|'ROLE_TEST_MANAGE'|'ROLE_TEST_VIEW'}, bool}, mixed, void>' (see https://psalm.dev/011)
|
Psalm
Process completed with exit code 2.
|
PHPStan:
src/Admin/AbstractAdmin.php#L1857
Offset 3 might not exist on array{0?: string, 1: string, 2?: string, 3?: string, 4?: string, 5?: string}.
|
PHPStan:
src/Admin/AbstractAdmin.php#L1858
Offset 5 might not exist on array{0?: string, 1: string, 2?: string, 3?: string, 4?: string, 5?: string}.
|
PHPStan:
src/Admin/AbstractAdmin.php#L1895
Offset 3 might not exist on array{0?: string, 1: string, 2?: string, 3?: string, 4?: string, 5?: string}.
|
PHPStan:
src/Admin/AbstractAdmin.php#L1896
Offset 5 might not exist on array{0?: string, 1: string, 2?: string, 3?: string, 4?: string, 5?: string}.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L73
Method Sonata\AdminBundle\Tests\Security\Handler\RoleSecurityHandlerTest::testIsGrantedWithSecurityInformation() has parameter $informationMapping with no value type specified in iterable type array.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L73
Method Sonata\AdminBundle\Tests\Security\Handler\RoleSecurityHandlerTest::testIsGrantedWithSecurityInformation() has parameter $userRoles with no value type specified in iterable type array.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L108
Generator expects value type array{string, string}, array{array{}, array{'ROLE_TEST_EDIT'}, true} given.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L109
Generator expects value type array{string, string}, array{array{VIEW: array{'EDIT', 'SHOW'}}, array{'ROLE_TEST_VIEW'}, true} given.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L110
Generator expects value type array{string, string}, array{array{WRITE: array{'EDIT', 'SHOW'}, MANAGE: array{'EDIT', 'SHOW', 'DELETE'}}, array{'ROLE_TEST_MANAGE'}, true} given.
|
PHPStan:
tests/Security/Handler/RoleSecurityHandlerTest.php#L111
Generator expects value type array{string, string}, array{array{ADMIN: array{'ALL'}}, array{'ROLE_TEST_ALL'}, true} given.
|