Projectslaravel-actionsUpgrade

Laravel Actions

Package

Synchronously dispatched action classes for Laravel.

Upgrade Guide

Upgrade

First stable release.

Added

  • Global middleware: prependGlobalMiddleware, appendGlobalMiddleware, flushGlobalMiddleware
  • ActionMiddleware contract implemented by built-in middleware
  • dispatchIf / dispatchUnless and overridable newAction()
  • make:action Artisan generator
  • allowExecution / disallowExecution overloads for per-class execution under a fake
  • Recording without faking (enableRecording / assertions)
  • Topic-based documentation under docs/ for bradietilley.dev
  • LICENSE, CHANGELOG, and contributor composer scripts

Changed

  • Requires PHP 8.3+ and Laravel 13
  • Tooling: Pest 4, PHPStan 2, Testbench 11
  • Duration formatting corrected; package-owned duration (no php-timer)
  • Assertion messages refer to actions, not jobs
  • Faked non-IsFakeable actions are recorded when skipped

Removed

  • Laravel 11 support
  • Bare allow() / disallow() (use allowExecution / disallowExecution)
  • Unused DatabaseManager injection and package views declaration

Migration from 0.x

  1. Upgrade to PHP 8.3+ and Laravel 13
  2. Replace Action::fake()->allow(Foo::class) with allowExecution(Foo::class) (same for disallowdisallowExecution)
  3. Use BradieTilley\Actions\Duration on ActionDispatched (not SebastianBergmann Timer)
  4. Call Action::replace([...]) with an array map (not two string arguments)