May 12, 2020
0
Level 1
vuongxuongminh/laravel-async has error "Declaration of ParentRuntime::createProcess($task, ?int $outputLength = NULL) should be compatible with ParentRuntime::createProcess($task, ?int $outputLength = NULL, ?string $binary = 'php')"
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');
});
}
}
Please or to participate in this conversation.