From 26b1c28eb557e832f937dfd0fdf58b356b959892 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 28 Oct 2026 08:56:25 +0000 Subject: [PATCH] chore(deps-dev): JIRA-18502 Update to Coding Style 6.x This updates to Coding Style 6.x, which uses PHPStan Extension Installer. --- .github/workflows/dependabot-auto-merge.yml | 2 +- .github/workflows/static.yml | 13 ++++++------ .github/workflows/tests.yml | 8 +++---- composer.json | 18 +++++++++------- ecs.php | 16 ++++++-------- phpstan.neon.dist | 1 - rector.php | 23 ++++++--------------- 7 files changed, 33 insertions(+), 48 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 0460982..35a9c03 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v3 + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index c5dcaf0..65656d5 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -14,16 +14,17 @@ jobs: name: PHPStan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: '8.4' coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v4 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run PHPStan run: composer test:types @@ -35,16 +36,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: '8.4' coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v4 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run ECS run: composer test:style diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3c2350a..f7f363e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,22 +13,20 @@ jobs: matrix: os: [ubuntu-latest] php: [8.4, 8.5] - laravel: [12.*, 13.*] + laravel: [13.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 13.* testbench: ^11.0 - - laravel: 12.* - testbench: ^10.7 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: ${{ matrix.php }} coverage: none diff --git a/composer.json b/composer.json index dfb1897..d71b03f 100644 --- a/composer.json +++ b/composer.json @@ -22,18 +22,19 @@ ], "require": { "php": "^8.4", - "illuminate/contracts": "^12.0|^13.0", + "illuminate/contracts": "^13.0", "nunomaduro/termwind": "^2.4", "spatie/laravel-package-tools": "^1.93" }, "require-dev": { - "guzzlehttp/guzzle": "^7.11", - "larastan/larastan": "^3.10", + "canvural/larastan-strict-rules": "^3.0", + "guzzlehttp/guzzle": "^7.11|^8.0", + "larastan/larastan": "^3.13", "nunomaduro/collision": "^8.9", - "orchestra/testbench": "^10.11|^11.1", - "pestphp/pest": "^4.7", - "pestphp/pest-plugin-laravel": "^4.1", - "worksome/coding-style": "^3.4" + "orchestra/testbench": "^11.1", + "pestphp/pest": "^5.0", + "pestphp/pest-plugin-laravel": "^5.0", + "worksome/coding-style": "^6.0" }, "autoload": { "psr-4": { @@ -63,7 +64,8 @@ "allow-plugins": { "pestphp/pest-plugin": true, "dealerdirect/phpcodesniffer-composer-installer": true, - "worksome/coding-style": true + "worksome/coding-style": true, + "phpstan/extension-installer": true } }, "extra": { diff --git a/ecs.php b/ecs.php index 520de6a..41a2064 100644 --- a/ecs.php +++ b/ecs.php @@ -2,15 +2,11 @@ declare(strict_types=1); -use Symplify\EasyCodingStandard\Config\ECSConfig; use Worksome\CodingStyle\WorksomeEcsConfig; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->paths([ - __DIR__ . '/src', - __DIR__ . '/tests', - __DIR__ . '/config', - ]); - - WorksomeEcsConfig::setup($ecsConfig); -}; +return WorksomeEcsConfig::configure() + ->withPaths([ + __DIR__ . '/src', + __DIR__ . '/tests', + __DIR__ . '/config', + ]); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c4a73a4..439f192 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,4 @@ includes: - - ./vendor/worksome/coding-style/larastan.neon - phpstan-baseline.neon parameters: diff --git a/rector.php b/rector.php index e1706e6..cb7eef2 100644 --- a/rector.php +++ b/rector.php @@ -2,22 +2,11 @@ declare(strict_types=1); -use Rector\Config\RectorConfig; use Worksome\CodingStyle\WorksomeRectorConfig; -return static function (RectorConfig $rectorConfig): void { - WorksomeRectorConfig::setup($rectorConfig); - - $rectorConfig->paths([ - __DIR__ . '/src', - __DIR__ . '/tests', - ]); - - // Define extra rule sets to be applied - $rectorConfig->sets([ - // SetList::DEAD_CODE, - ]); - - // Register extra a single rules - // $rectorConfig->rule(ClassOnObjectRector::class); -}; +return WorksomeRectorConfig::configure() + ->withPaths([ + __DIR__ . '/src', + __DIR__ . '/tests', + __DIR__ . '/config', + ]);