joseki/console
Composer 安装命令:
composer require joseki/console
包简介
Simple Symfony Console integration to Nette Framework
README 文档
README
Requirements
Joseki/Console requires PHP 5.4 or higher.
Installation
The best way to install Joseki/Console is using Composer:
$ composer require joseki/console
Setup
- create file e.g.
app/consolewith the following content:
#!/usr/bin/env php <?php /** @var Nette\DI\Container $container */ $container = require __DIR__ . '/bootstrap.php'; $application = $container->getService('Console.cli'); $application->run();
- register compiler extension in your
config.neon:
extensions: Console: Joseki\Console\DI\ConsoleExtension
- profit
Usage
Your console commands can be added via config.neon as a service with a joseki.console.command tag:
services: - class: Your\Own\Command tags: ['joseki.console.command']
or your can directly register it under Console compiler extension:
Console: commands: - Your\Own\Command
Running a console command
app/console yourCommandName
Too many commands? Long command names (including namespaces)?
Split your commands by their namespaces into separate console scripts. Separate your cron script from your database generators or migrations or whatever groups of commands you have. Simply register your console alias and namespace prefix of you commands group as follows:
Console: console: cron: 'myapp:crons' # accepts only commands from 'myapp:crons' namespace, eg. 'myapp:crons:emails'
Then create a new console file bin/cron:
#!/usr/bin/env php <?php /** @var Nette\DI\Container $container */ $container = require __DIR__ . '/bootstrap.php'; $application = $container->getService('Console.console.cron'); $application->run();
and run your commands with suffix name only. Compare old:
app/console myapp:crons:emails
with newly created way:
app/cron emails
joseki/console 适用场景与选型建议
joseki/console 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.43k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 08 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「console」 「nette」 「joseki」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 joseki/console 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 joseki/console 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 joseki/console 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
A table generator class for the PHP CLI.
Nette Framework adapter for I18n package
Build forms from schema
统计信息
- 总下载量: 1.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-29