Skip to content

Commit 44c7768

Browse files
authored
Merge pull request #28 from prajapati-kaushik/6555-made-for-symfony6-support
refactor: mode for symofny6 support #6555
2 parents 5081640 + 7723d25 commit 44c7768

3 files changed

Lines changed: 47 additions & 37 deletions

File tree

composer.json

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
11
{
2-
"name": "userbase/client",
3-
"description": "UserBase PHP Client: Identity + Login + Signup Service",
4-
"homepage": "http://www.github.com/userbase-project/userbase-client-php",
5-
"keywords": ["login", "signup", "user", "account"],
6-
"type": "library",
7-
"authors": [
8-
{
9-
"name": "Joost Faassen",
10-
"email": "j.faassen@linkorb.com",
11-
"role": "Development"
12-
},
13-
{
14-
"name": "kaushik prajapati",
15-
"email": "prajapatikaushik@gmail.com",
16-
"role": "Developer"
17-
}
18-
],
19-
"require": {
20-
"php": ">=5.3.0",
21-
"linkorb/envoi": "^1.0",
22-
"linkorb/userbase-role-contracts": "^2.0",
23-
"psr/cache": "~1.0",
24-
"symfony/cache": "~3.0 || ^4.0 || ^5.0",
25-
"symfony/event-dispatcher-contracts": "^2.0",
26-
"symfony/security-core": "~2.6 || ~3.0 || ^4.0 || ^5.0"
2+
"name": "userbase/client",
3+
"description": "UserBase PHP Client: Identity + Login + Signup Service",
4+
"homepage": "http://www.github.com/userbase-project/userbase-client-php",
5+
"keywords": [
6+
"login",
7+
"signup",
8+
"user",
9+
"account"
10+
],
11+
"type": "library",
12+
"authors": [
13+
{
14+
"name": "Joost Faassen",
15+
"email": "j.faassen@linkorb.com",
16+
"role": "Development"
2717
},
28-
"require-dev": {
29-
"symfony/dotenv": "~3.0 || ^4.0 || ^5.0"
30-
},
31-
"autoload": {
32-
"psr-4": {
33-
"UserBase\\Client\\": "src/"
34-
}
18+
{
19+
"name": "kaushik prajapati",
20+
"email": "prajapatikaushik@gmail.com",
21+
"role": "Developer"
22+
}
23+
],
24+
"require": {
25+
"php": ">=5.3.0",
26+
"linkorb/envoi": "^1.0",
27+
"linkorb/userbase-role-contracts": "^2.0",
28+
"psr/cache": "~1.0",
29+
"symfony/cache": "~3.0 || ^4.0 || ^5.0 || ^6.0",
30+
"symfony/event-dispatcher-contracts": "^2.0 || ^3.0",
31+
"symfony/security-core": "~2.6 || ~3.0 || ^4.0 || ^5.0 || ^6.0"
32+
},
33+
"require-dev": {
34+
"symfony/dotenv": "~3.0 || ^4.0 || ^5.0 || ^6.0"
35+
},
36+
"autoload": {
37+
"psr-4": {
38+
"UserBase\\Client\\": "src/"
3539
}
40+
}
3641
}

src/Event/UserLoadedEvent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace UserBase\Client\Event;
44

5+
56
use Symfony\Contracts\EventDispatcher\Event;
67
use UserBase\Client\Model\User;
78

src/Model/User.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22

33
namespace UserBase\Client\Model;
44

5-
use LinkORB\Contracts\UserbaseRole\RoleInterface;
6-
use RuntimeException;
75
use Symfony\Component\Security\Core\User\UserInterface as BaseUserInterface;
6+
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
7+
use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
8+
use RuntimeException;
9+
use LinkORB\Contracts\UserbaseRole\RoleInterface;
810

911
final class User implements
1012
AccountContainerInterface,
1113
BaseUserInterface,
1214
LegacyAdvancedUserInterface,
1315
PolicyContainerInterface,
1416
RoleInterface,
15-
UserInterface
17+
UserInterface,
18+
LegacyPasswordAuthenticatedUserInterface
1619
{
1720
/**
1821
* @deprecated
@@ -102,8 +105,9 @@ public function getRoles()
102105

103106
/**
104107
* {@inheritdoc}
108+
* @see PasswordAuthenticatedUserInterface
105109
*/
106-
public function getPassword()
110+
public function getPassword(): ?string
107111
{
108112
return $this->password;
109113
}
@@ -117,7 +121,7 @@ public function setPassword($password)
117121
/**
118122
* {@inheritdoc}
119123
*/
120-
public function getSalt()
124+
public function getSalt(): ?string
121125
{
122126
return $this->salt;
123127
}

0 commit comments

Comments
 (0)