Skip to content

Commit 1d31a11

Browse files
committed
up: upgrade support php8.4
1 parent eea510d commit 1d31a11

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/php.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: true
1212
matrix:
13-
php: [8.1, 8.2, 8.3] #
13+
php: [8.1, 8.2, 8.3, 8.4] #
1414
os: [ubuntu-latest, macOS-latest] # windows-latest,
1515
# include:
1616
# - os: 'ubuntu-latest'

src/File.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public static function getContents(
191191
bool $useIncludePath = false,
192192
$context = null,
193193
int $offset = 0,
194-
int $maxlen = null
194+
?int $maxlen = null
195195
): string {
196196
if (!is_file($filename)) {
197197
throw new InvalidArgumentException("No such file: $filename");

src/Traits/FileSystemFuncTrait.php

+4
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ public static function realpath(string $path): string
268268
}
269269

270270
$absolutes = [];
271+
if ($path[0] === '/') {
272+
$absolutes[] = '/';
273+
}
274+
271275
foreach ($parts as $part) {
272276
if ('.' === $part) {
273277
continue;

0 commit comments

Comments
 (0)