digipolisgent/robo-drush
Composer 安装命令:
composer require digipolisgent/robo-drush
包简介
Drush CommandStack for Robo Task Runner
README 文档
README
Extension to execute Drush commands in Robo.
Runs Drush commands in stack. You can define global options for all commands (like Drupal root and uri).
The option -y assumed by default but can be overridden on calls to exec() by passing false as the second parameter.
Table of contents
Differences with upstream
This package was forked from boedah/robo-drush. It adds the following changes:
- Adds support for PHP 8.1.
- Adds support for Drush 10, 11.
- Adds support for Robo 3, 4.
- Drops support for PHP 5.5, 5.6 and 7.0.
Installation
For new projects (and Robo >= 1.0.0-RC1), just do:
composer require --dev boedah/robo-drush
For older versions of Robo, use:
~1.0: Robo <= 0.4.5~2.1: Robo >= 0.5.2
Testing
composer test
Usage
Use the trait (according to your used version) in your RoboFile:
class RoboFile extends \Robo\Tasks { // if you use robo-drush ~2.1 for Robo >=0.5.2, or robo-drush >3 for Robo >=1.0.0-RC1, or robo-drush form Robo >=2.0.0 use \Boedah\Robo\Task\Drush\loadTasks; // if you use ~1.0 for Robo ~0.4 use \Boedah\Robo\Task\Drush; //... }
Examples
Site update
This executes pending database updates and reverts all features (from code to database):
$this->taskDrushStack() ->drupalRootDirectory('/var/www/html/some-site') ->uri('sub.example.com') ->maintenanceOn() ->updateDb() ->revertAllFeatures() ->maintenanceOff() ->run();
Site install
$this->taskDrushStack() ->siteName('Site Name') ->siteMail('site-mail@example.com') ->locale('de') ->accountMail('mail@example.com') ->accountName('admin') ->accountPass('pw') ->dbPrefix('drupal_') ->sqliteDbUrl('sites/default/.ht.sqlite') ->disableUpdateStatusModule() ->siteInstall('minimal') ->run();
digipolisgent/robo-drush 适用场景与选型建议
digipolisgent/robo-drush 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 150.43k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 11 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 digipolisgent/robo-drush 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 digipolisgent/robo-drush 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 150.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-18