diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 2ec0448..96e9a2d 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -18,6 +18,6 @@ jobs: args: --config=.php-cs-fixer.dist.php --allow-risky=yes - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index e4f16fd..b058e30 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup PHP - uses: shivammathur/setup-php@2.28.0 + uses: shivammathur/setup-php@2.29.0 with: php-version: '8.0' diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 80ad33b..4bf3f31 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -54,7 +54,7 @@ jobs: uses: actions/checkout@v4 - name: Setup PHP - uses: shivammathur/setup-php@2.28.0 + uses: shivammathur/setup-php@2.29.0 with: php-version: ${{ matrix.php }} extensions: fileinfo, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 94df2c3..0cdea23 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -21,7 +21,7 @@ jobs: release-notes: ${{ github.event.release.body }} - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: Update CHANGELOG diff --git a/CHANGELOG.md b/CHANGELOG.md index cdadda2..716500f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to `laravel-ray` will be documented in this file +## 1.34.0 - 2024-01-25 + +### What's Changed + +* Adds an artisan command to remove ray calls from your codebase. +* Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in https://github.com/spatie/laravel-ray/pull/321 +* Bump shivammathur/setup-php from 2.28.0 to 2.29.0 by @dependabot in https://github.com/spatie/laravel-ray/pull/330 + +**Full Changelog**: https://github.com/spatie/laravel-ray/compare/1.33.1...1.34.0 + ## 1.33.1 - 2024-01-04 - Allow symphony stopwatch 7 diff --git a/composer.json b/composer.json index 6466b82..e2c5ea6 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,9 @@ "illuminate/database": "^7.20|^8.19|^9.0|^10.0|^11.0", "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", + "rector/rector": "^0.19.2", "spatie/backtrace": "^1.0", - "spatie/ray": "^1.37", + "spatie/ray": "^1.41.1", "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", "zbateson/mail-mime-parser": "^1.3.1|^2.0" }, @@ -32,7 +33,7 @@ "laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0", "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0", "pestphp/pest": "^1.22|^2.0", - "phpstan/phpstan": "^0.12.93", + "phpstan/phpstan": "^1.10.57", "phpunit/phpunit": "^9.3|^10.1", "spatie/pest-plugin-snapshots": "^1.1|^2.0", "symfony/var-dumper": "^4.2|^5.1|^6.0|^7.0.3" diff --git a/src/Commands/CleanRayCommand.php b/src/Commands/CleanRayCommand.php new file mode 100644 index 0000000..a5ac864 --- /dev/null +++ b/src/Commands/CleanRayCommand.php @@ -0,0 +1,39 @@ +withProgressBar($directories, function ($directory) { + $result = Process::run('./vendor/bin/remove-ray.sh ' . $directory); + + if (! $result->successful()) { + $this->error($result->errorOutput()); + + return; + } + }); + + $this->newLine(2); + $this->info('All Ray calls have been removed from your codebase.'); + } +} diff --git a/src/RayServiceProvider.php b/src/RayServiceProvider.php index f4fb879..77e1d8b 100644 --- a/src/RayServiceProvider.php +++ b/src/RayServiceProvider.php @@ -11,6 +11,7 @@ use Illuminate\Support\Stringable; use Illuminate\Testing\TestResponse; use Illuminate\View\Compilers\BladeCompiler; +use Spatie\LaravelRay\Commands\CleanRayCommand; use Spatie\LaravelRay\Commands\PublishConfigCommand; use Spatie\LaravelRay\Payloads\MailablePayload; use Spatie\LaravelRay\Payloads\ModelPayload; @@ -59,6 +60,7 @@ public function boot() protected function registerCommands(): self { $this->commands(PublishConfigCommand::class); + $this->commands(CleanRayCommand::class); return $this; }