Fixed bitrot issues related to PHP updates.
This commit is contained in:
parent
3bcb7781dd
commit
9bb07806a0
6 changed files with 16 additions and 9 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
0.2301.11835
|
0.2301.11846
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// MariaDBBackend.php
|
// MariaDBBackend.php
|
||||||
// Created: 2021-04-30
|
// Created: 2021-04-30
|
||||||
// Updated: 2022-02-28
|
// Updated: 2023-01-01
|
||||||
|
|
||||||
namespace Index\Data\MariaDB;
|
namespace Index\Data\MariaDB;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ class MariaDBBackend implements IDbBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($needsUnix) {
|
if($needsUnix) {
|
||||||
if($unixPath === null)
|
if(empty($unixPath))
|
||||||
throw new InvalidArgumentException('Unix socket path is missing from DSN.');
|
throw new InvalidArgumentException('Unix socket path is missing from DSN.');
|
||||||
$endPoint = new UnixEndPoint($unixPath);
|
$endPoint = new UnixEndPoint($unixPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// DateTime.php
|
// DateTime.php
|
||||||
// Created: 2021-06-11
|
// Created: 2021-06-11
|
||||||
// Updated: 2022-02-27
|
// Updated: 2023-01-01
|
||||||
|
|
||||||
namespace Index;
|
namespace Index;
|
||||||
|
|
||||||
|
@ -641,6 +641,7 @@ class DateTime extends DateTimeImmutable implements JsonSerializable, Stringable
|
||||||
* @param \DateTime $object Mutable object that should be sourced.
|
* @param \DateTime $object Mutable object that should be sourced.
|
||||||
* @return DateTime New immutable DateTime representing the same value.
|
* @return DateTime New immutable DateTime representing the same value.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public static function createFromMutable(\DateTime $object): DateTime {
|
public static function createFromMutable(\DateTime $object): DateTime {
|
||||||
return self::cast($object);
|
return self::cast($object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// Base32Serialiser.php
|
// Base32Serialiser.php
|
||||||
// Created: 2022-01-13
|
// Created: 2022-01-13
|
||||||
// Updated: 2022-02-27
|
// Updated: 2023-01-01
|
||||||
|
|
||||||
namespace Index\Serialisation;
|
namespace Index\Serialisation;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class Base32Serialiser extends Serialiser {
|
||||||
|
|
||||||
$bin = str_split($bin, 5);
|
$bin = str_split($bin, 5);
|
||||||
$last = array_pop($bin);
|
$last = array_pop($bin);
|
||||||
$bin[] = str_pad($last, 5, '0', STR_PAD_RIGHT);
|
$bin[] = str_pad((string)$last, 5, '0', STR_PAD_RIGHT);
|
||||||
|
|
||||||
foreach($bin as $part)
|
foreach($bin as $part)
|
||||||
$output .= self::CHARS[bindec($part)];
|
$output .= self::CHARS[bindec($part)];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// Version.php
|
// Version.php
|
||||||
// Created: 2021-04-29
|
// Created: 2021-04-29
|
||||||
// Updated: 2022-02-27
|
// Updated: 2023-01-01
|
||||||
|
|
||||||
namespace Index;
|
namespace Index;
|
||||||
|
|
||||||
|
@ -234,6 +234,12 @@ class Version implements Stringable, IComparable, IEquatable {
|
||||||
if(!preg_match('#^v?(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$#', $versionString, $matches))
|
if(!preg_match('#^v?(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$#', $versionString, $matches))
|
||||||
throw new InvalidArgumentException('$versionString is not a valid version string.');
|
throw new InvalidArgumentException('$versionString is not a valid version string.');
|
||||||
|
|
||||||
return new Version($matches['major'], $matches['minor'], $matches['patch'], $matches['prerelease'] ?? '', $matches['build'] ?? '');
|
return new Version(
|
||||||
|
(int)$matches['major'],
|
||||||
|
(int)$matches['minor'],
|
||||||
|
(int)$matches['patch'],
|
||||||
|
$matches['prerelease'] ?? '',
|
||||||
|
$matches['build'] ?? ''
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
pushd .
|
pushd .
|
||||||
cd $(dirname "$0")
|
cd $(dirname "$0")
|
||||||
|
|
Loading…
Add table
Reference in a new issue