Skip to content

Commit 6e10ab2

Browse files
authored
chore: enabled support for php 8.4 (#77)
1 parent cbf4476 commit 6e10ab2

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
operating-system: ['ubuntu-latest']
14-
php-versions: ['8.1', '8.2', '8.3']
14+
php-versions: ['8.1', '8.2', '8.3', '8.4']
1515
services:
1616
redis:
1717
image: redis

pint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"preset": "psr12",
23
"rules": {
34
"header_comment": {
45
"header": "This file is part of the godruoyi/php-snowflake.\n \n(c) Godruoyi <g@godruoyi.com> \n \nThis source file is subject to the MIT license that is bundled."

src/FileLockResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ protected function getSequence(string $filePath, int $currentTime): int
9090
}
9191

9292
$this->updateContents($contents = $this->incrementSequenceWithSpecifyTime(
93-
$this->cleanOldSequences($contents), $currentTime
93+
$this->cleanOldSequences($contents),
94+
$currentTime
9495
), $f);
9596

9697
$this->unlock($f);

tests/FileLockResolverTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
class FileLockResolverTest extends TestCase
1919
{
20+
private FileLockResolver $fileLocker;
21+
/** @var callable */
22+
private $defer;
23+
2024
protected function setUp(): void
2125
{
2226
[$dir, $defer] = $this->prepareLockPath();

0 commit comments

Comments
 (0)