Skip to content

Commit

Permalink
chore: Check compatibility with PHP 8.4 (#199)
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Klein <[email protected]>
  • Loading branch information
schakko committed Sep 13, 2024
1 parent b0fcda1 commit 8d25c35
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Run unit tests
strategy:
matrix:
php: [ "8.1", "8.2", "8.3" ]
php: [ "8.1", "8.2", "8.3", "8.4" ]
phpunit: [ "9.6.20" ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run unit tests
strategy:
matrix:
php: [ "8.1", "8.2", "8.3" ]
php: [ "8.1", "8.2", "8.3", "8.4.0" ]
phpunit: [ "9.6.20" ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Run unit tests
strategy:
matrix:
php: [ "8.1", "8.2", "8.3" ]
php: [ "8.1", "8.2", "8.3", "8.4.0" ]
phpunit: [ "9.6.20" ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ It is __not__ possible to activate *NADI* for a site inside a network.
For detailed information you can visit the official [GitHub repository of Next Active Directory Integration](https://github.com/NeosIT/active-directory-integration2)

= UNRELEASED =
* CHANGED: Compatibility with upcoming version PHP 8.4 has been checked (#199)
* FIXED: Fix deprecated ldap_connect signature (#198)
* CHANGED: Update PHPUnit to 9.6.20 (#197)
* FIXED: SQL injection in Multisite WordPress when being already authenticated as network admin (#196)


= 3.1.5 =
* CHANGED: WordPress 6.6 compatibility has been checked

Expand Down
4 changes: 2 additions & 2 deletions src/plug-in/Dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -1109,9 +1109,9 @@ public function getLoginSucceededService()
$this->loginSucceededService = new LoginSucceededService(
$this->getLoginState(),
$this->getLdapAttributeService(),
$this->getUserManager(),
$this->getLdapConnection(),
$this->getMultisiteConfigurationService()
$this->getMultisiteConfigurationService(),
$this->getUserManager(),
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/plug-in/User/LoginSucceededService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ class LoginSucceededService
/**
* @param LoginState $loginState
* @param Service $attributeService
* @param Manager $userManager
* @param Connection $ldapConnection
* @param \Dreitier\WordPress\Multisite\Configuration\Service $multisiteConfigurationService
* @param ?Manager $userManager
*/
public function __construct(
LoginState $loginState,
Service $attributeService,
Manager $userManager = null,
Connection $ldapConnection,
\Dreitier\WordPress\Multisite\Configuration\Service $multisiteConfigurationService
\Dreitier\WordPress\Multisite\Configuration\Service $multisiteConfigurationService,
?Manager $userManager = null,
)
{
$this->loginState = $loginState;
Expand Down
6 changes: 3 additions & 3 deletions src/shared/Ldap/UserQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UserQuery
*/
private $credentials = null;

private function __construct(Credentials $credentials = null, $principal = null)
private function __construct(?Credentials $credentials = null, ?string $principal = null)
{
$this->principal = $principal;
$this->credentials = $credentials;
Expand Down Expand Up @@ -92,7 +92,7 @@ public function withGuid(string $guid)
* @param Credentials|null $credentials
* @return UserQuery
*/
public static function forPrincipal($principal, Credentials $credentials = null)
public static function forPrincipal($principal, ?Credentials $credentials = null)
{
return new UserQuery($credentials, $principal);
}
Expand All @@ -113,7 +113,7 @@ public static function forCredentials(Credentials $credentials)
* @param Credentials|null $credentials
* @return mixed
*/
public static function forGuid($guid, Credentials $credentials = null)
public static function forGuid($guid, ?Credentials $credentials = null)
{
$r = new UserQuery($credentials, $guid);
return $r->setGuid();
Expand Down
4 changes: 2 additions & 2 deletions test/Nadi/User/LoginSucceededServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public function sut($methods = null, $simulated = false)
array(
$this->loginState,
$this->attributeService,
$simulated ? null : $this->userManager,
$this->ldapConnection,
$this->configuration
$this->configuration,
$simulated ? null : $this->userManager,
)
)->setMethods($methods)
->getMock();
Expand Down

0 comments on commit 8d25c35

Please sign in to comment.