Skip to content

Commit e746977

Browse files
committed
fix PHP 8.4 support
1 parent 96a8d88 commit e746977

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/SimpleSAML/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ public function getEndpointPrioritizedByBinding(
13151315
*/
13161316
public function getDefaultEndpoint(
13171317
string $endpointType,
1318-
array $bindings = null,
1318+
?array $bindings = null,
13191319
mixed $default = self::REQUIRED_OPTION,
13201320
): mixed {
13211321
$endpoints = $this->getEndpoints($endpointType);

src/SimpleSAML/Locale/Localization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function getDomainLocaleDir(string $domain): string
130130
* @param string $localeDir Absolute path if the module is housed elsewhere
131131
* @param string $domain Translation domain within module; defaults to module name
132132
*/
133-
public function addModuleDomain(string $module, string $localeDir = null, string $domain = null): void
133+
public function addModuleDomain(string $module, ?string $localeDir = null, ?string $domain = null): void
134134
{
135135
if (!$localeDir) {
136136
$localeDir = $this->getDomainLocaleDir($module);

src/SimpleSAML/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static function isModuleEnabled(string $module): bool
156156
* @throws Error\BadRequest In case the request URI is malformed.
157157
* @throws Error\NotFound In case the request URI is invalid or the resource it points to cannot be found.
158158
*/
159-
public static function process(Request $request = null): Response
159+
public static function process(?Request $request = null): Response
160160
{
161161
if ($request === null) {
162162
$request = Request::createFromGlobals();

src/SimpleSAML/Utils/HTTP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public function checkSessionCookie(?string $retryURL = null): void
380380
* @throws Error\Exception If the URL is not allowed by configuration.
381381
*
382382
*/
383-
public function checkURLAllowed(string $url, array $trustedSites = null): string
383+
public function checkURLAllowed(string $url, ?array $trustedSites = null): string
384384
{
385385
if (empty($url)) {
386386
return '';
@@ -1019,7 +1019,7 @@ public function redirectUntrustedURL(string $url, array $parameters = []): Redir
10191019
* are not strings.
10201020
*
10211021
*/
1022-
public function resolveURL(string $url, string $base = null): string
1022+
public function resolveURL(string $url, ?string $base = null): string
10231023
{
10241024
if ($base === null) {
10251025
$base = $this->getBaseURL();
@@ -1094,7 +1094,7 @@ public function resolveURL(string $url, string $base = null): string
10941094
*
10951095
*
10961096
*/
1097-
public function setCookie(string $name, ?string $value, array $params = null, bool $throw = true): void
1097+
public function setCookie(string $name, ?string $value, ?array $params = null, bool $throw = true): void
10981098
{
10991099
$default_params = [
11001100
'lifetime' => 0,

src/SimpleSAML/Utils/System.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function getTempDir(): string
143143
* @return string An absolute path referring to $path.
144144
*
145145
*/
146-
public function resolvePath(string $path, string $base = null): string
146+
public function resolvePath(string $path, ?string $base = null): string
147147
{
148148
if ($base === null) {
149149
$config = Configuration::getInstance();

src/SimpleSAML/XHTML/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class_exists($controller)
172172
* @param bool $tag
173173
* @return string
174174
*/
175-
public function asset(string $asset, string $module = null, bool $tag = true): string
175+
public function asset(string $asset, ?string $module = null, bool $tag = true): string
176176
{
177177
$baseDir = $this->configuration->getBaseDir();
178178
$basePath = $this->configuration->getBasePath();

0 commit comments

Comments
 (0)