vuongxuongminh / laravel-async

Package provide simple way to run code asynchronously for your Laravel application.
MIT License
154 stars 26 forks source link

Declaration of VXM\\Async\\Runtime\\ParentRuntime::createProcess($task, ?int $outputLength = NULL): Spatie\\Async\\Process\\Runnable should be compatible with Spatie\\Async\\Runtime\\ParentRuntime::createProcess($task, ?int $outputLength = NULL, ?string $binary = 'php'): Spatie\\Async\\Process\\Runnable #6

Closed visualNext closed 4 years ago

visualNext commented 4 years ago

When I execute function, an error message appears:

Declaration of VXM\\Async\\Runtime\\ParentRuntime::createProcess($task, ?int $outputLength = NULL): Spatie\\Async\\Process\\Runnable should be compatible with Spatie\\Async\\Runtime\\ParentRuntime::createProcess($task, ?int $outputLength = NULL, ?string $binary = 'php'): Spatie\\Async\\Process\\Runnable

My installation steps: step 1

composer require vxm/laravel-async

step 2

php artisan vendor:publish --provider="VXM\Async\AsyncServiceProvider" --tag="config"

step 3 IndexController.php

use Async;
class IndexController extends Controller
{
    public function index(Request $request)
    { 
        // do something...

        Async::run(function() {
            Log::info('Async');
        });

    }
}
vuongxuongminh commented 4 years ago

Thanks you, it's bug. I had fixed on version 1.1.1, you can update and retry.