Releases: PhpGt/Daemon
Environment variables
With the latest May 2024 release, environment variables can be passed along to the subprocess. This minor patch release defaults the environment to that of the calling shell, so subprocesses have access to the PATH of the caller - this is useful for commands like gt build
that require other system commands such as node
, sass
, etc.
May 2024 release
CI and type safety improvements
We're one step closer to a CI environment fully hosted within Github Actions now, with PHPUnit and PHPStan tests being run within Actions. Codesniffer is planned soon too.
PHP 8 compatibility is made possible thanks to an updated dependency tree.
Packagist release
This release contains no new files compared to v1.1.0, but is made due to an error with Packagist reading an earlier tag.
Process arguments passed as array
Since PHP 7.4's release, proc_open takes an array of arguments to start a new process, rather than a string to pass to a subshell. This change makes a huge difference, as processes are never left hanging due to their execution within a separate subshell. This does increase the minimum PHP version to 7.4, but that's OK due to WebEngine's support timeline.
Subprocesses handled by `exec`
Stable release
This release is actually quite boring. There is no new functionality, and no bugfixes, just the addition of a readme file.
The Daemon repository has been in use in PHP.Gt projects for the last few months untouched. There is no planned new functionality, so there is no reason not to release a v1 stable release! Sometimes, boring is good.
Have fun, and remember to use the issue tracker if you have any problems.
Non-blocking Process Pool
Amongst further tests and refactoring, the main feature in this pre-release is the switch to asynchronous pool closing.
Process blocking and exit codes
This release consists mainly of unit tests to improve the coverage, but through testing an issue was caught: proc_open
opens a process to the system's underlying shell -- not the actual command being run. Because of this, there is no way to know if the command exists or not. There was a bad assumption written inside the exec
function checking on a failed execution, but the failure could never occur. Tests added and functionality adjusted to get around this limitation.
Initial class implementation
Thanks to Yassine Say @sayyassine9 for the contributions in getting the Daemon repository working on Windows. This repo will be used within the Installer (php.gt/installer) as soon as it reaches v1.