Skip to content

Commit a9ad9b0

Browse files
authored
Merge pull request #217 from dachcom-digital/bugfix/interface-compatibility
fix user interface compatibility (#16)
2 parents ad854ed + 6a8d3a7 commit a9ad9b0

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

UPGRADE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Upgrade Notes
22

3+
## 5.1.2
4+
- **[BUGFIX]**: Fix interface compatibility [#216](https://github.com/dachcom-digital/pimcore-members/issues/216)
5+
36
## 5.1.1
47
- **[BUGFIX]**: Fix chunked serving of protected video assets [#214](https://github.com/dachcom-digital/pimcore-members/pull/214)
58

src/Adapter/User/UserInterface.php

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,44 @@
1414
namespace MembersBundle\Adapter\User;
1515

1616
use Carbon\Carbon;
17+
use Pimcore\Model\Element\ElementInterface;
1718
use Symfony\Component\Security\Core\User\EquatableInterface;
1819
use Symfony\Component\Security\Core\User\UserInterface as BaseUserInterface;
1920

20-
interface UserInterface extends BaseUserInterface, EquatableInterface
21+
interface UserInterface extends BaseUserInterface, EquatableInterface, ElementInterface
2122
{
2223
public const ROLE_DEFAULT = 'ROLE_USER';
2324
public const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN';
2425

25-
public function setId(?int $id): static;
26-
27-
public function getId(): ?int;
28-
29-
public function setParentId(?int $parentId): static;
30-
31-
public function getParentId(): ?int;
32-
33-
public function setKey(string $key): static;
34-
35-
public function getKey(): ?string;
36-
37-
public function setProperty(string $name, string $type, mixed $data, bool $inherited = false, bool $inheritable = false): static;
38-
39-
public function getProperty(string $name, bool $asContainer = false): mixed;
40-
4126
public function setPublished(bool $published): static;
4227

4328
public function getPublished(): bool;
4429

45-
public function setConfirmationToken(?string $confirmationToken): static;
30+
public function setConfirmationToken(?string $confirmationToken);
4631

4732
public function getConfirmationToken(): ?string;
4833

49-
public function setLastLogin(Carbon $time): static;
34+
public function setLastLogin(Carbon $time);
5035

5136
public function getLastLogin(): ?Carbon;
5237

53-
public function setPassword(string $password): static;
38+
public function setPassword(?string $password);
5439

5540
public function getPassword(): ?string;
5641

57-
public function setUserName(?string $userName): static;
42+
public function setUserName(?string $userName);
5843

5944
public function getUserName(): ?string;
6045

61-
public function setEmail(?string $email): static;
46+
public function setEmail(?string $email);
6247

6348
public function getEmail(): ?string;
6449

65-
public function setGroups(array $groups): static;
50+
public function setGroups(array $groups);
6651

6752
public function getGroups(): ?array;
6853

69-
public function setPasswordRequestedAt(?Carbon $date): static;
54+
public function setPasswordRequestedAt(?Carbon $date);
7055

7156
public function getPasswordRequestedAt(): ?Carbon;
7257

@@ -77,16 +62,12 @@ public function getPasswordRequestedAt(): ?Carbon;
7762
*/
7863
public function isPasswordRequestNonExpired(int $ttl): bool;
7964

80-
public function setPlainPassword(string $password): self;
65+
public function setPlainPassword(string $password);
8166

8267
public function getPlainPassword(): ?string;
8368

8469
public function isAccountNonExpired(): bool;
8570

8671
public function isAccountNonLocked(): bool;
8772

88-
/**
89-
* @throws \Exception
90-
*/
91-
public function save();
9273
}

src/Adapter/User/UserTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function removeGroup(GroupInterface $userGroup): void
137137
$this->setGroups($groups);
138138
}
139139

140-
public function setPlainPassword(string $password): self
140+
public function setPlainPassword(string $password)
141141
{
142142
$this->plainPassword = $password;
143143

@@ -164,7 +164,7 @@ public function isAccountNonLocked(): bool
164164
return true;
165165
}
166166

167-
public function __toString()
167+
public function __toString(): string
168168
{
169169
return (string) $this->getUsername();
170170
}

0 commit comments

Comments
 (0)