spatie / async

Easily run code asynchronously

Home Page:https://spatie.be/en/opensource/php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sh: line 0: exec: php: not found

Sans84 opened this issue · comments

Laravel and all dependencies of the latest version.
PHP 8.1
Valet

Pool::isSupported() return true

echo exec("/opt/homebrew/Cellar/php@8.1/8.1.24/bin/php -v");
// with Zend OPcache v8.1.24, Copyright (c), by Zend Technologies

echo shell_exec("/opt/homebrew/Cellar/php@8.1/8.1.24/bin/php -v");
// PHP 8.1.24 (cli) (built: Sep 28 2023 22:28:52) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.24, Copyright (c) Zend Technologies with Zend OPcache v8.1.24, Copyright (c), by Zend Technologies

$pool = Pool::create()
        ->withBinary('/opt/homebrew/Cellar/php@8.1/8.1.24/bin/php');
$pool[] = async(function () use ($i) {
...
await($pool);

// sh: line 0: exec: php: not found