Skip to content

Commit

Permalink
up: upgrade support php8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Dec 5, 2024
1 parent eea510d commit 1d31a11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3] #
php: [8.1, 8.2, 8.3, 8.4] #
os: [ubuntu-latest, macOS-latest] # windows-latest,
# include:
# - os: 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static function getContents(
bool $useIncludePath = false,
$context = null,
int $offset = 0,
int $maxlen = null
?int $maxlen = null
): string {
if (!is_file($filename)) {
throw new InvalidArgumentException("No such file: $filename");
Expand Down
4 changes: 4 additions & 0 deletions src/Traits/FileSystemFuncTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ public static function realpath(string $path): string
}

$absolutes = [];
if ($path[0] === '/') {
$absolutes[] = '/';
}

foreach ($parts as $part) {
if ('.' === $part) {
continue;
Expand Down

0 comments on commit 1d31a11

Please sign in to comment.