Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Process Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v1.1.9

What's Changed

  • Fixed potential hang on Windows when a process crashes introduced in 1.1.8.

Full Changelog: https://github.com/amphp/process/compare/v1.1.8...v1.1.9

v1.1.8

What's Changed

  • Fixed potential exception on Windows if a process crashes.

Full Changelog: https://github.com/amphp/process/compare/v1.1.7...v1.1.8

v2.0.3

What's Changed

  • Make implicit nullable types explicit to avoid deprecation notice in PHP 8.4.

Full Changelog: https://github.com/amphp/process/compare/v2.0.2...v2.0.3

v1.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/process/compare/v1.1.6...v1.1.7

v1.1.6

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/process/compare/v1.1.5...v1.1.6

v1.1.5

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/process/compare/v1.1.4...v1.1.5

v2.0.2

What's Changed

  • Changed waiting for children during shutdown to be synchronous to ensure all children are properly cleaned up. This should avoid zombie processes left when running within an SAPI such as PHP-FPM.
  • Fixed 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

v2.0.1

What's Changed

  • Fixed error handling if the started process fails immediately.

Full Changelog: https://github.com/amphp/process/compare/v2.0.0...v2.0.1

v2.0.0

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 method
  • Process::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()
  • Improved handling if the Process object is destructed, but the process streams (STDIN, STDOUT, STDERR) are still used
  • Renamed escapeArguments to escapeArgument
  • Removed custom stream implementations
  • Removed StatusError
  • Fixed and improved wrapper copy if running inside of PHARs on Windows
  • Removed nullability of Process::getWorkingDirectory()
  • Avoid calling join() inside kill() to avoid suspensions in destructors
  • Added an optional Cancellation parameter to Process::join()
  • Fixed ended processes sometimes leaving zombie processes on *nix systems (requires ext-pcntl, an optional dependency)
v2.0.0-beta.7
  • Add compatibility with Revolt v1.x
v2.0.0-beta.6
  • Added an optional Cancellation parameter to Process::join().
v2.0.0-beta.5
  • Fixed shutdown behavior, which could cause an InvalidCallbackError
v2.0.0-beta.4
  • Removed check for ext-pcntl, which is not strictly required for this library.
  • Fixed ended processes sometimes leaving zombie processes on *nix systems (requires ext-pcntl)
v1.1.4
  • Fixed ended processes sometimes leaving zombie processes on *nix systems (requires ext-pcntl, an optional dependency)
v2.0.0-beta.3

What's Changed

  • Drop dependency on amphp/sync
  • Add compatibility with revolt/event-loop 0.2.x

Full Changelog: https://github.com/amphp/process/compare/v2.0.0-beta.2...v2.0.0-beta.3

v2.0.0-beta.2
  • Fixed and improved wrapper copy if running inside of PHARs on Windows
  • Removed nullability of Process::getWorkingDirectory()
  • Fixed compatibility with amphp/byte-stream v2.0.0-beta.2
  • Avoid calling join() inside kill() to avoid suspensions in destructors
v1.1.3
  • Fixed wrapper path if running inside PHARs on Windows
  • Improved wrapper copy behavior if running inside PHARs on Windows
  • Removed ProcessException being thrown if process killing fails on Windows, which has been subject to race conditions
v2.0.0-beta.1
  • Process::__construct() is now private in favor of Process::start()
  • Process::start() is now static instead of an instance method
  • Process::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()
  • Improved handling if process is destructed, but streams are still used
  • Renamed escapeArguments to escapeArgument
  • Removed custom stream implementations
  • Removed StatusError
v1.1.2
  • Added a work-around for a bug with preloading and conditionally declared functions (#53)
v1.1.1
  • Fixed socket TypeError on PHP 8
  • Use taskkill on windows for Process::kill()
v1.1.0
  • Added escapeArguments() function that escapes process arguments for each platform (i.e., Windows vs. Linux/Unix) (#35)
  • File descriptors inherited from the parent process are now closed automatically in the child process on Posix systems.
  • Updated bundled Windows process wrapper executable to v1.2 (#34)
  • Fixed Process::signal() sending signals to the wrapper child process instead of the intended child (#36)
  • Fixed Process::join() resolving before the child process exits due to termination signals being sent and handled or ignored by the child process (#36)
v1.0.3
  • Fixed killing unresponsive processes.
v1.0.2
  • Fixed hanging on Windows if the child process is killed.
v1.0.1
  • Fixed issue on Windows when calling Process::getStdin(), Process::getStdout(), or Process::getStderr() immediately after the process has started.
v1.0.0

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.
v0.3.3
  • Fixed starting processes inside PHARs on Windows.
  • Fixed Deferred double resolution in case of an error.
v0.3.2
  • Fixed timing issues on streams.
  • Fixed timeout issue on Windows if the event loop is blocked initially (#21).
v0.3.1
  • Fixed issues on Windows if a process is killed during startup.
  • Improved examples to work on Windows.
v0.3.0

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.
v0.2.1
  • Changed return types of Process::getStd*() functions to be more specific. By specifying ResourceInputStream and ResourceOutputStream, methods such as close() or unreference() can reliably be used.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport