Skip to content

Commit

Permalink
chore: enabled support for php 8.4 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
jklab authored Nov 22, 2024
1 parent cbf4476 commit 6e10ab2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2', '8.3', '8.4']
services:
redis:
image: redis
Expand Down
1 change: 1 addition & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"preset": "psr12",
"rules": {
"header_comment": {
"header": "This file is part of the godruoyi/php-snowflake.\n \n(c) Godruoyi <[email protected]> \n \nThis source file is subject to the MIT license that is bundled."
Expand Down
3 changes: 2 additions & 1 deletion src/FileLockResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ protected function getSequence(string $filePath, int $currentTime): int
}

$this->updateContents($contents = $this->incrementSequenceWithSpecifyTime(
$this->cleanOldSequences($contents), $currentTime
$this->cleanOldSequences($contents),
$currentTime
), $f);

$this->unlock($f);
Expand Down
4 changes: 4 additions & 0 deletions tests/FileLockResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

class FileLockResolverTest extends TestCase
{
private FileLockResolver $fileLocker;
/** @var callable */
private $defer;

protected function setUp(): void
{
[$dir, $defer] = $this->prepareLockPath();
Expand Down

0 comments on commit 6e10ab2

Please sign in to comment.