From bbd5cf63f4dcfb6bb6ac385b615cda8ce22feb05 Mon Sep 17 00:00:00 2001 From: Greg Upton Date: Sun, 23 Nov 2025 11:40:20 -0500 Subject: [PATCH 1/2] Add stub publish support and coverage --- src/SluggableServiceProvider.php | 5 +++++ stubs/action.stub | 15 +++++++++++++++ tests/Feature/SluggableTest.php | 15 +++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 stubs/action.stub diff --git a/src/SluggableServiceProvider.php b/src/SluggableServiceProvider.php index 5b07b124..d1f5f822 100644 --- a/src/SluggableServiceProvider.php +++ b/src/SluggableServiceProvider.php @@ -17,6 +17,11 @@ public function boot() $this->publishes([ __DIR__.'/../config/sluggable.php' => config_path('sluggable.php'), ], 'config'); + + // Publish the action stub + $this->publishes([ + __DIR__.'/../stubs/action.stub' => base_path('stubs/action.stub'), + ], 'actions-stubs'); } /** diff --git a/stubs/action.stub b/stubs/action.stub new file mode 100644 index 00000000..32d49ea3 --- /dev/null +++ b/stubs/action.stub @@ -0,0 +1,15 @@ +assertFileExists(config_path('sluggable.php')); }); +it('can publish the action stub', function () { + $stubPath = base_path('stubs/action.stub'); + + if (file_exists($stubPath)) { + unlink($stubPath); + } + + $this->artisan('vendor:publish', [ + '--provider' => 'AesirCloud\Sluggable\SluggableServiceProvider', + '--tag' => 'actions-stubs', + ])->assertExitCode(0); + + $this->assertFileExists($stubPath); +}); + it('merges the configuration file', function () { $config = config('sluggable.source'); expect($config)->toBe('title'); From 05d7496d0bcf5e5835c48b7affdc7b41437b0d91 Mon Sep 17 00:00:00 2001 From: Greg Upton Date: Sat, 29 Nov 2025 08:54:39 -0500 Subject: [PATCH 2/2] Add changelog entry for 1.1.5 release --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97823f1a..fa09f12f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to `sluggable` will be documented in this file. +## 1.1.5 - 2025-09-23 +- **Fix:** Added publishable action stub mapping and template to restore `vendor:publish --tag=actions-stubs` support. +- **Tests:** Added coverage to ensure the action stub publishes successfully. + ## 1.1.4 - 2025-08-26 - **Change:** Dropped support for Laravel 11; package now targets Laravel 12 and newer. - **Change:** Bumped minimum PHP version requirement to 8.4.