diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 198da3a..d3fbb21 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -13,9 +13,9 @@ jobs: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.2 coverage: none - run: composer install --no-progress --prefer-dist - - run: composer phpstan -- --no-progress + - run: composer stan -- --no-progress continue-on-error: true # is only informative diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 29c6331..845b7b7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['8.0', '8.1', '8.2', '8.3'] + php: ['8.2', '8.3', '8.4'] fail-fast: false @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.2 coverage: none - run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable @@ -47,7 +47,7 @@ jobs: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.2 coverage: none - run: composer install --no-progress --prefer-dist diff --git a/composer.json b/composer.json index 56835f3..ae20085 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ } ], "require": { - "php": ">=8.0", - "h4kuna/critical-cache": "^v1.0", + "php": ">=8.2", + "h4kuna/critical-cache": "^v1.0.4", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0 || ^2.0" diff --git a/src/Utils.php b/src/Utils.php index eedc46f..1964054 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -114,7 +114,7 @@ public static function transformCurrencies(array $currencies): array /** * @param int $beforeExpiration // 900 seconds -> 15 minutes */ - public static function countTTL(DateTime $dateTime, int $beforeExpiration = 900, int $time = null): int + public static function countTTL(DateTime $dateTime, int $beforeExpiration = 900, ?int $time = null): int { $time ??= time(); if (($dateTime->getTimestamp() - $beforeExpiration) <= $time) {