Skip to content

Commit 02cfbef

Browse files
committed
Update dependencies
1 parent 89f62e2 commit 02cfbef

File tree

10 files changed

+1870
-1311
lines changed

10 files changed

+1870
-1311
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
.php_cs.cache
3+
.phpunit.result.cache
34
*.idea
45
/vendor

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"friendsofphp/php-cs-fixer": "^2.0",
28-
"lightsaml/lightsaml": "^1.1",
28+
"lightsaml/lightsaml": "^2.0",
2929
"phpunit/phpunit": "^9.0",
3030
"satooshi/php-coveralls": "^1.0",
3131
"laminas/laminas-diactoros": "^2.0"

composer.lock

+1,836-1,265
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml

+16-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
<phpunit bootstrap="./test/bootstrap.php"
2-
backupGlobals="false"
3-
backupStaticAttributes="false"
4-
convertErrorsToExceptions="true"
5-
convertNoticesToExceptions="true"
6-
convertWarningsToExceptions="true"
7-
stopOnError="false"
8-
stopOnFailure="false"
9-
stopOnIncomplete="false"
10-
stopOnSkipped="false"
11-
processIsolation="false"
12-
colors="true">
13-
<testsuites>
14-
<testsuite name="Authentication">
15-
<directory>./test/src</directory>
16-
</testsuite>
17-
</testsuites>
18-
<logging>
19-
<log type="coverage-clover" target="./test/log/clover.xml"/>
20-
</logging>
21-
<filter>
22-
<whitelist processUncoveredFilesFromWhitelist="true">
23-
<directory>./src</directory>
24-
</whitelist>
25-
</filter>
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./test/bootstrap.php" backupGlobals="false" backupStaticAttributes="false" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" processIsolation="false" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory>./src</directory>
6+
</include>
7+
<report>
8+
<clover outputFile="./test/log/clover.xml"/>
9+
</report>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="Authentication">
13+
<directory>./test/src</directory>
14+
</testsuite>
15+
</testsuites>
16+
<logging/>
2617
</phpunit>

src/LoginPolicy/LoginPolicy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private function getValidExternalUrlValue(?string $url): ?string
189189
throw new InvalidArgumentException('URL is not valid');
190190
}
191191

192-
public function jsonSerialize()
192+
public function jsonSerialize(): array
193193
{
194194
return [
195195
'username_format' => $this->getUsernameFormat(),

src/Password/Manager/PasswordManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function needsRehash($hash, $hashed_with)
8787
*/
8888
private function pbkdf2($p, $s, $c, $kl, $a = 'sha256')
8989
{
90-
$hl = strlen(hash($a, null, true)); // Hash length
90+
$hl = strlen(hash($a, '', true)); // Hash length
9191
$kb = ceil($kl / $hl); // Key blocks to compute
9292
$dk = ''; // Derived key
9393

src/Password/Policy/PasswordPolicy.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ public function requireSymbols()
7979
return $this->require_symbols;
8080
}
8181

82-
/**
83-
* {@inheritdoc}
84-
*/
85-
public function jsonSerialize()
82+
public function jsonSerialize(): array
8683
{
8784
return [
8885
'min_length' => $this->getMinLength(),

test/src/AuthenticatedUser/AuthenticatedUser.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ public function canAuthenticate()
119119
return $this->can_authenticate;
120120
}
121121

122-
/**
123-
* {@inheritdoc}
124-
*/
125-
public function jsonSerialize()
122+
public function jsonSerialize(): array
126123
{
127-
return ['id' => $this->getId(), 'name' => $this->getFullName(), 'email' => $this->getEmail()];
124+
return [
125+
'id' => $this->getId(),
126+
'name' => $this->getFullName(),
127+
'email' => $this->getEmail(),
128+
];
128129
}
129130
}

test/src/Session/Session.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,7 @@ public function setIsExtendedSession($value)
108108
return $this;
109109
}
110110

111-
/**
112-
* {@inheritdoc}
113-
*/
114-
public function jsonSerialize()
111+
public function jsonSerialize(): array
115112
{
116113
$expires_at = null;
117114

@@ -121,7 +118,11 @@ public function jsonSerialize()
121118
$expires_at = $this->expires_at->getTimestamp();
122119
}
123120

124-
return ['session_id' => $this->session_id, 'user_id' => $this->user_id, 'expires_at' => $expires_at];
121+
return [
122+
'session_id' => $this->session_id,
123+
'user_id' => $this->user_id,
124+
'expires_at' => $expires_at,
125+
];
125126
}
126127

127128
/**

test/src/Token/Token.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ public function setExtraAttribute($value)
8585
return $this;
8686
}
8787

88-
/**
89-
* {@inheritdoc}
90-
*/
91-
public function jsonSerialize()
88+
public function jsonSerialize(): array
9289
{
9390
$expires_at = null;
9491

0 commit comments

Comments
 (0)