totten/process-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

totten/process-helper

最新稳定版本:v1.0.2

Composer 安装命令:

composer require totten/process-helper

包简介

Some quick sugar for working with Symfony Process

README 文档

README

This is a quick bit of sugar for working with Symfony Process.

use \ProcessHelper\ProcessHelper as PH;
$p = PH::runOk(['ls -la @TGT', 'TGT' => '/home/myuser/Documents/Lots of Stuff']);
print_r(explode("\n", $p->getOutput()));

Bits of extra behavior:

  • Set env var DEBUG to display information about any commands as they are executed. (This is loosely similar to using bash's set -x.)
    • DEBUG=1 - Show basic summary information
    • DEBUG=2 - Show full, real-time output
  • The run() and runOk() helpers will execute the command while respecting the DEBUG option.
  • The run() and runOk() helpers will automatically cast strings and arrays into Process objects. When constructing the Process, variables may be escaped and interpolated.
  • The runOk() helper will assert that the command executed normally. If there's an error, it throws an exception. The resulting exception message will report more details about the failed subcommand.

This doesn't really seem like it should be a standalone project, except that I've found these snippets useful in like 5+ projects...

统计信息

  • 总下载量: 19.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固