From 0060a1510f4685c011c98a78a5966ef5dcccf64c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 31 Jul 2025 12:09:52 +0700 Subject: [PATCH 1/2] Bump dependencies to support php 8.5 syntax --- composer.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index c00de95ddc..e944716b02 100644 --- a/composer.json +++ b/composer.json @@ -15,31 +15,31 @@ "php": ">=8.2", "composer/pcre": "^3.3.2", "composer/xdebug-handler": "^3.0.5", - "friendsofphp/php-cs-fixer": "^3.75.0", - "illuminate/container": "^12.10", - "nette/utils": "^4.0.5", + "friendsofphp/php-cs-fixer": "^3.85.1", + "illuminate/container": "^12.21", + "nette/utils": "^4.0.7", "sebastian/diff": "^6.0.2", - "squizlabs/php_codesniffer": "^3.13", - "symfony/console": "^6.4.20", - "symfony/finder": "^7.2.2", + "squizlabs/php_codesniffer": "^3.13.2", + "symfony/console": "^6.4.23", + "symfony/finder": "^7.3.0", "symplify/coding-standard": "^12.4.3", "symplify/easy-parallel": "^11.2.2", "webmozart/assert": "^1.11" }, "require-dev": { "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-phpunit": "^2.0.6", + "phpstan/phpstan": "^2.1.21", + "phpstan/phpstan-phpunit": "^2.0.7", "phpstan/phpstan-webmozart-assert": "^2.0", - "phpunit/phpunit": "^11.5", - "rector/rector": "^2.0.12", - "rector/type-perfect": "^2.0.2", - "symplify/phpstan-extensions": "^12.0", - "symplify/vendor-patches": "^11.4", - "tomasvotruba/class-leak": "^2.0", + "phpunit/phpunit": "^11.5.27", + "rector/rector": "^2.1.2", + "rector/type-perfect": "^2.1.0", + "symplify/phpstan-extensions": "^12.0.1", + "symplify/vendor-patches": "^11.5", + "tomasvotruba/class-leak": "^2.0.5", "tomasvotruba/type-coverage": "^2.0.2", - "tomasvotruba/unused-public": "^2.0", - "tracy/tracy": "^2.10.9" + "tomasvotruba/unused-public": "^2.0.1", + "tracy/tracy": "^2.10.10" }, "autoload": { "psr-4": { From 85f052bf5196c027053879e67b30a51d59bc726c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 31 Jul 2025 12:11:32 +0700 Subject: [PATCH 2/2] cs fix --- ecs.php | 2 +- rector.php | 4 +-- .../EditorConfig/EditorConfigFactoryTest.php | 32 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ecs.php b/ecs.php index 06b91faf50..cedc72d9aa 100644 --- a/ecs.php +++ b/ecs.php @@ -9,4 +9,4 @@ ->withEditorConfig() ->withRootFiles() ->withSkip(['*/Source/*', '*/Fixture/*']) - ->withPreparedSets(symplify: true, psr12: true, common: true); + ->withPreparedSets(psr12: true, common: true, symplify: true); diff --git a/rector.php b/rector.php index bb35d35b9c..5be5fa132d 100644 --- a/rector.php +++ b/rector.php @@ -8,12 +8,12 @@ return RectorConfig::configure() ->withPhpSets() ->withPreparedSets( - codeQuality: true, deadCode: true, + codeQuality: true, codingStyle: true, typeDeclarations: true, - naming: true, privatization: true, + naming: true, earlyReturn: true ) ->withPaths([__DIR__ . '/bin', __DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/config', __DIR__ . '/tests']) diff --git a/tests/Configuration/EditorConfig/EditorConfigFactoryTest.php b/tests/Configuration/EditorConfig/EditorConfigFactoryTest.php index d8f59c3ed6..03939edc2d 100644 --- a/tests/Configuration/EditorConfig/EditorConfigFactoryTest.php +++ b/tests/Configuration/EditorConfig/EditorConfigFactoryTest.php @@ -24,8 +24,8 @@ public function testLoadingFromProjectRoot(): void $this->assertEquals($editorConfig, new EditorConfig( indentStyle: IndentStyle::Space, endOfLine: EndOfLine::Posix, - insertFinalNewline: true, trimTrailingWhitespace: true, + insertFinalNewline: true, maxLineLength: null, quoteType: null )); @@ -70,8 +70,8 @@ public function testLoadsExpectedSections(): void new EditorConfig( indentStyle: IndentStyle::Tab, endOfLine: EndOfLine::Posix, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: 100, quoteType: null ), @@ -85,8 +85,8 @@ public function testEmpty(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -105,8 +105,8 @@ public function testIndentStyleSpaces(): void new EditorConfig( indentStyle: IndentStyle::Space, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -125,8 +125,8 @@ public function testIndentStyleTabs(): void new EditorConfig( indentStyle: IndentStyle::Tab, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -145,8 +145,8 @@ public function testEndOfLinePosix(): void new EditorConfig( indentStyle: null, endOfLine: EndOfLine::Posix, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -165,8 +165,8 @@ public function testEndOfLineLegacy(): void new EditorConfig( indentStyle: null, endOfLine: EndOfLine::Legacy, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -185,8 +185,8 @@ public function testEndOfLineWindows(): void new EditorConfig( indentStyle: null, endOfLine: EndOfLine::Windows, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -205,8 +205,8 @@ public function testTrimTrailingWhitespaceEnabled(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: true, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -225,8 +225,8 @@ public function testTrimTrailingWhitespaceDisabled(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: false, + insertFinalNewline: null, maxLineLength: null, quoteType: null ) @@ -245,8 +245,8 @@ public function testInsertFinalNewlineEnabled(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: true, trimTrailingWhitespace: null, + insertFinalNewline: true, maxLineLength: null, quoteType: null ) @@ -265,8 +265,8 @@ public function testInsertFinalNewlineDisabled(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: false, trimTrailingWhitespace: null, + insertFinalNewline: false, maxLineLength: null, quoteType: null ) @@ -285,8 +285,8 @@ public function testMaxLineLength(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: 63, quoteType: null ) @@ -305,8 +305,8 @@ public function quoteTypeAuto(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: QuoteType::Auto ) @@ -325,8 +325,8 @@ public function quoteTypeSingle(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: QuoteType::Single ) @@ -345,8 +345,8 @@ public function quoteTypeDouble(): void new EditorConfig( indentStyle: null, endOfLine: null, - insertFinalNewline: null, trimTrailingWhitespace: null, + insertFinalNewline: null, maxLineLength: null, quoteType: QuoteType::Double )