diff --git a/.github/workflows/guzzle-logger-check.yml b/.github/workflows/guzzle-logger-check.yml index f08b4ba..75251d3 100644 --- a/.github/workflows/guzzle-logger-check.yml +++ b/.github/workflows/guzzle-logger-check.yml @@ -28,7 +28,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@2.25.1 with: - php-version: 8.2 + php-version: '8.3' - name: 🛠️Install dependencies run: composer install --no-interaction --prefer-dist --no-progress @@ -48,7 +48,7 @@ jobs: - name: Setup PHP with Xdebug uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' coverage: xdebug - name: 🧪Run test suite diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a10eb..12d5342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0] - 2024-11-19 + +### Changed +- Upgrades runtime to php 8.3 + ## [1.0.1] - 2024-03-26 ### Changed diff --git a/composer.json b/composer.json index 1e32ec3..15e4a03 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "ext-json": "*", "guzzlehttp/guzzle": "^7.7", "psr/log": "^3.0" @@ -33,7 +33,7 @@ "symfony/var-dumper": "^4.2", "friendsofphp/php-cs-fixer": "^3.6", "eduarguz/shift-php-cs": "^3.0", - "rector/rector": "^0.17.0", + "rector/rector": "^1", "fig/log-test": "^1.1", "phpstan/phpstan": "^1.10" }, diff --git a/rector.php b/rector.php index cbb7110..cdffadd 100644 --- a/rector.php +++ b/rector.php @@ -3,25 +3,18 @@ declare(strict_types=1); use Rector\Caching\ValueObject\Storage\FileCacheStorage; +use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; -use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; use Rector\Set\ValueObject\LevelSetList; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPaths([ __DIR__.'/src', __DIR__.'/tests', - ]); - - // define sets of rules - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_82, - ]); - - $rectorConfig->skip([ - JsonThrowOnErrorRector::class, - ]); - - $rectorConfig->cacheClass(FileCacheStorage::class); - $rectorConfig->cacheDirectory('./.rector-cache'); -}; + ]) + ->withRules([ + InlineConstructorDefaultToPropertyRector::class, + ])->withSets([ + LevelSetList::UP_TO_PHP_83, + ]) + ->withCache('./.rector-cache', FileCacheStorage::class); diff --git a/src/LoggerWithSanitizer.php b/src/LoggerWithSanitizer.php index 96367c5..86c10a1 100644 --- a/src/LoggerWithSanitizer.php +++ b/src/LoggerWithSanitizer.php @@ -13,6 +13,7 @@ public function __construct(private readonly LoggerInterface $logger, private re // } + #[\Override] public function log($level, \Stringable|string $message, array $context = []): void { if (! empty($this->fieldsToSanitize)) { diff --git a/tests/Unit/HttpLogMiddlewareTest.php b/tests/Unit/HttpLogMiddlewareTest.php index b4ee30c..5a18ca0 100644 --- a/tests/Unit/HttpLogMiddlewareTest.php +++ b/tests/Unit/HttpLogMiddlewareTest.php @@ -22,6 +22,7 @@ class HttpLogMiddlewareTest extends TestCase private TestLogger $logger; + #[\Override] public function setUp(): void { parent::setUp();