Release 2.25 (#5109)

This commit is contained in:
Kevin Papst
2024-11-21 22:44:49 +01:00
committed by GitHub
parent 49eb7068c9
commit 0c26a2678e
261 changed files with 6431 additions and 7426 deletions

View File

@@ -19,22 +19,17 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
abstract class AbstractVoterTest extends TestCase
{
protected function getVoter(string $voterClass): Voter
protected function getVoter(string $voterClass): Voter // @phpstan-ignore missingType.generics
{
$class = new \ReflectionClass($voterClass);
/** @var Voter $voter */
$voter = $class->newInstance($this->getRolePermissionManager());
$voter = $class->newInstance($this->getRolePermissionManager()); // @phpstan-ignore missingType.generics
self::assertInstanceOf(Voter::class, $voter);
return $voter;
}
/**
* @param int $id
* @param string|null $role
* @return User
*/
protected function getUser(int $id, ?string $role)
protected function getUser(int $id, ?string $role): User
{
$roles = [];
if (!empty($role)) {
@@ -55,8 +50,6 @@ abstract class AbstractVoterTest extends TestCase
/**
* @param array<string, array<string>> $permissions
* @param bool $overwrite
* @return RolePermissionManager
*/
protected function getRolePermissionManager(array $permissions = [], bool $overwrite = false): RolePermissionManager
{