laravel-actions

⚡️ Laravel components that take care of one specific task

MIT License

Downloads
3.5M
Stars
2.5K
Committers
26

Bot releases are hidden (Show)

laravel-actions - v2.1.5

Published by lorisleiva over 3 years ago

Make Laravel Actions ready for Octane by always accessing the container and the request on demand rather than storing them as class properties (requires manual testing to ensure it works properly).

laravel-actions - v2.1.4

Published by lorisleiva over 3 years ago

  • Ensure explicit method routes do not trigger authorisation nor validation. (b4424fc526d7926c7fc307148f11a20716519ff7).
  • Ensure jobs marked as ShouldBeUnique can be tested using the assertPushed helper method (#120).
  • Add Actions::registerCommands($paths) method for auto-registration of commands (#112).
laravel-actions - v2.1.3

Published by lorisleiva over 3 years ago

Support controllers with explicit methods (See #123 and #110).

laravel-actions - v2.1.2

Published by lorisleiva over 3 years ago

Allow UniqueJobDecorator to be prepended in the asJob arguments. (See #95)

laravel-actions - v2.1.1

Published by lorisleiva over 3 years ago

  • Add support for queued listeners (See #87)
  • Fix method signature in docblock (See #89)
  • Use getRealPath instead of getPathname to parse the classname (See #92)
  • Ensure the class exists before trying to register its routes (See #90)
laravel-actions - v2.1.0

Published by lorisleiva over 3 years ago

Add support for optional unified attributes (See #100)

class MyAction
{
    use AsAction;
    use WithAttributes;

    public function handle(array $attributes = [])
    {
        $this->fill($attributes);
        $this->validateAttributes();

        // ...
    }
}
laravel-actions - v2.0.7

Published by lorisleiva over 3 years ago

php artisan make:action is back (#86)

laravel-actions - v2.0.6

Published by lorisleiva almost 4 years ago

Fix a bug that did not clear fake instances when running multiple tests within the same application instance.

Instead of storing the fake instance as a static property on the action class, it is now stored as a prefixed container instance and so they are automatically cleared between each tests (See 5136c3e8828effe08de56d317aca8dce8ea9bb2f).

laravel-actions - v2.0.5

Published by lorisleiva almost 4 years ago

Ensure the ActionRequest and therefore the validator refreshes between requests even on validation failure. (2a0a8c59f43b4afb77c10d29cb3da4025e29651f)

laravel-actions - v2.0.4

Published by lorisleiva almost 4 years ago

Support injecting (optionally) a Batch or JobDecorator as the first argument of the asJob method.

// Without injecting.
public function asJob($foo, $bar)
{
    // ...
}

// Injecting the batch.
public function asJob(?Batch $batch, $foo, $bar)
{
    // ...
}

// Injecting the decorator.
public function asJob(JobDecorator $job, $foo, $bar)
{
    // ...
}
laravel-actions - v2.0.3

Published by lorisleiva almost 4 years ago

Support batchable jobs.

Bus::batch([
    FirstAction::makeJob(1),
    SecondAction::makeJob(2),
    ThirdAction::makeJob(3),
])->then(function () {
    // All jobs completed successfully...
})->dispatch();
laravel-actions - v2.0.2

Published by lorisleiva almost 4 years ago

Support registering actions as commands in the scheduler.

$scheduler->command(MyAction::class)->daily();

Add setters on the JobDecorators to set more properties using the configureJob method.

public function configureJob(JobDecorator $job): void
{
    $job->setTries(10)
        ->setMaxExceptions(3)
        ->setTimeout(60 * 30);
}
laravel-actions - v2.0.1

Published by lorisleiva almost 4 years ago

Support more configuration properties and methods from AsJob.

  • $jobTries
  • $jobMaxExceptions
  • $jobBackoff
  • $jobTimeout
  • $jobRetryUntil
  • getJobBackoff
  • getJobRetryUntil
laravel-actions - v2.0.0

Published by lorisleiva almost 4 years ago

⚡️ Laravel Actions has been re-written from scratch and provides a much simpler, less intrusive API allowing you to run any PHP class as anything you want.

laravel-actions - v1.2.2

Published by lorisleiva almost 4 years ago

Use stubs to generate Actions through the make command (#78)

laravel-actions - v1.2.1

Published by lorisleiva almost 4 years ago

⬆️ Support PHP 8

laravel-actions - v1.2.0

Published by lorisleiva almost 4 years ago

⚙️ Ensure Models and Collections are serialized correctly within attributes when running an action as a Job. (See #68)

laravel-actions - v1.1.8

Published by lorisleiva almost 4 years ago

🚑 Fix getAttributesFromConstructor method when running as a controller (cfcfc3d38d18399edbaaf7a873f759cd318d8f74)

laravel-actions - v1.1.7

Published by lorisleiva almost 4 years ago

📝 Ignore console output when the return value is null

laravel-actions - v1.1.6

Published by lorisleiva about 4 years ago

🔭 Add optional HasTelescopeTags trait (#53)