Skip to content

Commit 41fff98

Browse files
committed
Fix AclProviderInterface and relevant classes because of the overriding method error
1 parent 58b5959 commit 41fff98

File tree

5 files changed

+41
-4
lines changed

5 files changed

+41
-4
lines changed

Diff for: extension.neon

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ parameters:
2626
- stubs/Symfony/Component/HttpFoundation/Session.stub
2727
- stubs/Symfony/Component/Process/Process.stub
2828
- stubs/Symfony/Component/PropertyAccess/PropertyPathInterface.stub
29+
- stubs/Symfony/Component/Security/Acl/Dbal/AclProvider.stub
30+
- stubs/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.stub
2931
- stubs/Symfony/Component/Security/Acl/Model/AclInterface.stub
3032
- stubs/Symfony/Component/Security/Acl/Model/AclProviderInterface.stub
3133
- stubs/Symfony/Component/Security/Acl/Model/EntryInterface.stub
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Acl\Dbal;
4+
5+
use Symfony\Component\Security\Acl\Model\AclInterface;
6+
use Symfony\Component\Security\Acl\Model\AclProviderInterface;
7+
8+
/**
9+
* @implements AclProviderInterface<AclInterface>
10+
*/
11+
class AclProvider implements AclProviderInterface
12+
{
13+
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Acl\Dbal;
4+
5+
use Symfony\Component\Security\Acl\Model\MutableAclInterface;
6+
use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface;
7+
8+
/**
9+
* @implements MutableAclProviderInterface<MutableAclInterface>
10+
*/
11+
class MutableAclProvider implements MutableAclProviderInterface
12+
{
13+
14+
}

Diff for: stubs/Symfony/Component/Security/Acl/Model/AclProviderInterface.stub

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
namespace Symfony\Component\Security\Acl\Model;
44

5+
/**
6+
* @template TAcl of AclInterface
7+
*/
58
interface AclProviderInterface
69
{
710
/**
811
* @phpstan-param array<SecurityIdentityInterface> $sids
9-
* @phpstan-return AclInterface
12+
* @phpstan-return TAcl
1013
*/
1114
public function findAcl(ObjectIdentityInterface $oid, array $sids = []);
1215

1316
/**
1417
* @phpstan-param array<ObjectIdentityInterface> $oids
1518
* @phpstan-param array<SecurityIdentityInterface> $sids
16-
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, AclInterface>
19+
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, TAcl>
1720
*/
1821
public function findAcls(array $oids, array $sids = []);
1922
}

Diff for: stubs/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.stub

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22

33
namespace Symfony\Component\Security\Acl\Model;
44

5+
/**
6+
* @template TAcl of MutableAclInterface
7+
* @extends AclProviderInterface<TAcl>
8+
*/
59
interface MutableAclProviderInterface extends AclProviderInterface
610
{
711
/**
812
* @phpstan-param array<SecurityIdentityInterface> $sids
9-
* @phpstan-return MutableAclInterface
13+
* @phpstan-return TAcl
1014
*/
1115
public function findAcl(ObjectIdentityInterface $oid, array $sids = []);
1216

1317
/**
1418
* @phpstan-param array<ObjectIdentityInterface> $oids
1519
* @phpstan-param array<SecurityIdentityInterface> $sids
16-
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, MutableAclInterface>
20+
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, TAcl>
1721
*/
1822
public function findAcls(array $oids, array $sids = []);
1923
}

0 commit comments

Comments
 (0)