amphp/process
Asynchronous process dispatcher for PHP (AMPHP) built for fibers and concurrency. Start and manage child processes cross-platform, stream stdout/stderr without blocking, set working directory and environment variables, powered by the Revolt event loop and Windows wrapper.
Full Changelog: https://github.com/amphp/process/compare/v1.1.8...v1.1.9
Full Changelog: https://github.com/amphp/process/compare/v1.1.7...v1.1.8
Full Changelog: https://github.com/amphp/process/compare/v2.0.2...v2.0.3
Full Changelog: https://github.com/amphp/process/compare/v1.1.6...v1.1.7
Full Changelog: https://github.com/amphp/process/compare/v1.1.5...v1.1.6
posix_kill crashing / killing other programs on null by @gerardroche in https://github.com/amphp/process/pull/68Full Changelog: https://github.com/amphp/process/compare/v1.1.4...v1.1.5
UnhandledFutureError being thrown to event loop if reading the process exit code fails.Full Changelog: https://github.com/amphp/process/compare/v2.0.1...v2.0.2
Full Changelog: https://github.com/amphp/process/compare/v2.0.0...v2.0.1
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.
Process::__construct() is now private in favor of Process::start()Process::start() is now static instead of an instance methodProcess::start()no longer returns the PID, use Process::getPid()Process::kill() no longer causes an exception to be thrown from Process::join()Process::getEnv() has been renamed to Process::getEnvironment()Process object is destructed, but the process streams (STDIN, STDOUT, STDERR) are still usedescapeArguments to escapeArgumentStatusErrorProcess::getWorkingDirectory()join() inside kill() to avoid suspensions in destructorsCancellation parameter to Process::join()ext-pcntl, an optional dependency)Cancellation parameter to Process::join().InvalidCallbackErrorext-pcntl, which is not strictly required for this library.ext-pcntl)ext-pcntl, an optional dependency)amphp/syncrevolt/event-loop 0.2.xFull Changelog: https://github.com/amphp/process/compare/v2.0.0-beta.2...v2.0.0-beta.3
Process::getWorkingDirectory()amphp/byte-stream v2.0.0-beta.2join() inside kill() to avoid suspensions in destructorsProcessException being thrown if process killing fails on Windows, which has been subject to race conditionsProcess::__construct() is now private in favor of Process::start()Process::start() is now static instead of an instance methodProcess::start() does no longer return the PID, use Process::getPid()Process::kill() does no longer result in an exception of Process::join()Process::getEnv() has been renamed to Process::getEnvironment()escapeArguments to escapeArgumentStatusErrorTypeError on PHP 8taskkill on windows for Process::kill()escapeArguments() function that escapes process arguments for each platform (i.e., Windows vs. Linux/Unix) (#35)v1.2 (#34)Process::signal() sending signals to the wrapper child process instead of the intended child (#36)Process::join() resolving before the child process exits due to termination signals being sent and handled or ignored by the child process (#36)Process::getStdin(), Process::getStdout(), or Process::getStderr() immediately after the process has started.This release introduces a couple of backwards-compatibility breaks that will require some small adjustments to code using this library.
Process::start() now returns a promise. This promise must resolve before calling Process::getPid(), Process::getStdin(), Process::getStdout(), and Process::getStderr() otherwise an exception is thrown from these methods.Process::getPid() now returns an integer.Process, ProcessInputStream, and ProcessOutputStream are now final.Deferred double resolution in case of an error.Windows support added!
Only some minor API breaks were necessary:
Process::getPid() now returns a promise for the PID.Process::getStdIn() returns an instance of ProcessInputStream instead of ResourceInputStream, however the same API is shared by both classes.Process::getStdOut() and Process::getStdErr() both return an instance of ProcessOutputStream instead of ResourceOutputStream, however the same API is shared by both classes.Process::getStd*() functions to be more specific. By specifying ResourceInputStream and ResourceOutputStream, methods such as close() or unreference() can reliably be used.How can I help you explore Laravel packages today?