Skip to content

Commit c5fb0ca

Browse files
committed
Symfony 4 compatibility
1 parent 7f01465 commit c5fb0ca

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

Resources/config/services.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55

66
services:
77
gatekeeper:
8-
class: %gatekeeper.class%
8+
class: '%gatekeeper.class%'
99

1010
gatekeeper.repository.dummy:
1111
class: GateKeeper\Repository\DummyRepository
@@ -21,12 +21,12 @@ services:
2121

2222
gatekeeper.access.allow:
2323
public: false
24-
class: %gatekeeper.access.allow.class%
24+
class: '%gatekeeper.access.allow.class%'
2525
tags:
2626
- { name: gatekeeper.access }
2727

2828
gatekeeper.access.deny:
2929
public: false
30-
class: %gatekeeper.access.deny.class%
30+
class: '%gatekeeper.access.deny.class%'
3131
tags:
32-
- { name: gatekeeper.access }
32+
- { name: gatekeeper.access }

Voter/GateKeeper.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,21 @@
88

99
use GateKeeper\GateKeeper as Keeper;
1010
use GateKeeper\Item\ItemInterface;
11-
use GateKeeper\Provider\GatesProviderInterface;
1211
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1312
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1413

1514
class GateKeeper implements VoterInterface
1615
{
17-
/**
18-
* @var array|null
19-
*/
20-
private $gates;
21-
22-
/**
23-
* @var GatesProviderInterface
24-
*/
25-
private $gatesProvider;
26-
2716
/**
2817
* @var \GateKeeper\GateKeeper
2918
*/
3019
private $gateKeeper;
3120

3221
/**
3322
* @param Keeper $gateKeeper
34-
* @param GatesProviderInterface $gatesProvider
3523
*/
36-
public function __construct(Keeper $gateKeeper, GatesProviderInterface $gatesProvider)
24+
public function __construct(Keeper $gateKeeper)
3725
{
38-
$this->gatesProvider = $gatesProvider;
3926
$this->gateKeeper = $gateKeeper;
4027
}
4128

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@
1111
{
1212
"name": "Bartłomiej Kuleszewicz",
1313
"email": "[email protected]"
14+
},
15+
{
16+
"name": "Tomasz Wójcik",
17+
"email": "[email protected]"
1418
}
1519
],
1620
"require": {
17-
"php": ">=5.4",
21+
"php": "^5.4 || ^7.4 || ^8.0",
1822
"docplanner/gatekeeper": "2.*",
19-
"symfony/dependency-injection": "^2.8|^3.0",
20-
"symfony/http-kernel": "^2.8|^3.0",
21-
"symfony/config": "^2.8|^3.0",
22-
"symfony/security": "^2.8|^3.0"
23+
"symfony/dependency-injection": "^2.8 || ^3.0 || ^4.0",
24+
"symfony/http-kernel": "^2.8 || ^3.0 || ^4.0",
25+
"symfony/config": "^2.8 || ^3.0 || ^4.0",
26+
"symfony/security": "^2.8 || ^3.0 || ^4.0"
2327
},
2428
"autoload": {
2529
"psr-4": {

0 commit comments

Comments
 (0)