Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/php-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -21,7 +30,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: "${{ matrix.php-version }}"
coverage: none # disable xdebug, pcov

- name: Composer install
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"license": "MIT",
"keywords": ["monolog", "psr-3", "psr-log", "dev", "phpstan", "phpstan-extension", "static analysis"],
"require": {
"php": "^8.1",
"psr/log": "^2.0 || ^3.0",
"php": "^7.4 || ^8.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"phpstan/phpstan": "^2.0"
},
"require-dev": {
"illuminate/support": "^10 || ^11 || ^12",
"monolog/monolog": "^3.9",
"illuminate/support": "^8 || ^9 || ^10 || ^11 || ^12",
"monolog/monolog": "^2 || ^3.9",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan-deprecation-rules": "^2.0.1",
"phpstan/phpstan-phpunit": "^2.0.6",
"phpstan/phpstan-strict-rules": "^2.0.4",
"phpunit/phpunit": "^10.5.45",
"redaxo/source": "^5.18",
"phpunit/phpunit": "^9 || ^10.5.45",
"redaxo/source": "^5",
"symplify/easy-coding-standard": "^12.5.11",
"tomasvotruba/unused-public": "^2.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/MessageInterpolationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private function isPsr3LikeCall(MethodReflection $methodReflection): bool
return in_array(strtolower($methodReflection->getName()), $this->psr3LogMethods, true);
}

if ($methodReflection->getDeclaringClass()->is(\rex_logger::class)) {
if ($methodReflection->getDeclaringClass()->is(\rex_logger::class)) { // @phpstan-ignore class.notFound
if (strtolower($methodReflection->getName()) === 'logerror') {
return true;
}
Expand Down
4 changes: 4 additions & 0 deletions tests/Rules/MessageInterpolationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function testLaravelExample(): void

public function testRedaxo(): void
{
if (PHP_VERSION_ID >= 80000) {
$this->markTestSkipped('Test requires PHP 7.x.');
}

require_once __DIR__ . '/../../vendor/redaxo/source/redaxo/src/core/lib/base/factory_trait.php';
require_once __DIR__ . '/../../vendor/redaxo/source/redaxo/src/core/lib/util/logger.php';

Expand Down