jascha030/process-chain
最新稳定版本:1.1.0
Composer 安装命令:
composer require jascha030/process-chain
包简介
Chain symfony/process commands together.
README 文档
README
Chain symfony/process commands together.
Getting started
Prerequisites
- php:
>=8.1 - Composer
^2.3
Installation
composer require jascha030/process-chain
Usage
<?php use Jascha030\Process\Chain\ProcessChain; use Symfony\Component\Console\Output\ConsoleOutput; // Define the commands to run in the process chain $commands = [ 'echo "Hello"', 'echo "World"', ]; // Create a new instance of the ProcessChain class $processChain = ProcessChain::create( $commands, new ConsoleOutput() ); // Disable output for the processes in the chain $processChain->disableOutput(); // Run the processes in the chain $processChain->mustRun(); // Get the exit codes for the processes in the chain $exitCodes = $processChain->getExitCodes(); // Output the exit codes for each command foreach ($exitCodes as $command => $exitCode) { echo "{$command} exited with code {$exitCode}\n"; }
License
This composer package is an open-sourced software licensed under the MIT License
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-28