oliverkuches/cilex7
最新稳定版本:1.0.2
Composer 安装命令:
composer require oliverkuches/cilex7
包简介
The a form of the PHP micro-framework for Command line tools based on the Symfony2 Components
关键字:
README 文档
README
This project is a fork of the existing Cilex project, and aims to add support for PHP 7 & later Symfony versions.
Cilex is a simple command line application framework to develop simple tools based on Symfony2 components:
<?php if (!$loader = include __DIR__.'/vendor/autoload.php') { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\GreetCommand()); $app->command('foo', function ($input, $output) { $output->writeln('Example output'); }); $app->run();
Cilex works with PHP 7.3 or later and is heavily inspired by the Silex web micro-framework by Fabien Potencier.
Installation
git clonethis repository.- Download composer:
curl -s https://getcomposer.org/installer | php - Install Cilex' dependencies:
php composer.phar install
Usage
- Create your new commands in
src/Cilex/Command/ - Add your new commands to
bin/run.php - Run the commands as:
./bin/run.php demo:greet world ./bin/run.php demo:greet world -y ./bin/run.php demo:greet world --yell ./bin/run.php demo:info
Creating a PHAR
- Download and install box:
curl -LSs https://box-project.github.io/box2/installer.php | php
chmod +x box.phar
mv box.phar /usr/local/bin/box
- Update the project phar config in box.json
- Create the package:
box build
- Run the commands:
./cilex.phar demo:greet world ./cilex.phar demo:greet world -y ./cilex.phar demo:greet world --yell ./cilex.phar demo:info
- enjoy a lot.
License
Cilex is licensed under the MIT license.
FAQ
Q: How do I pass configuration into the application?
A: You can do this by adding the following line, where $configPath is the path to the configuration file you want to use:
$app->register(new \Cilex\Provider\ConfigServiceProvider(), array('config.path' => $configPath));
The formats currently supported are: YAML, XML and JSON
oliverkuches/cilex7 适用场景与选型建议
oliverkuches/cilex7 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 728 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 12 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「microframework」 「cli」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oliverkuches/cilex7 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oliverkuches/cilex7 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oliverkuches/cilex7 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A lightweight, secure-by-default PHP microframework built on Slim – providing Laravel-like features (ORM, authentication, migrations, caching) without the bloat. Perfect for building REST APIs and small-to-medium PHP applications.
Slim starter / Slim skeleton package to boost your development with Slim framework
Generates a trait to help ease the access of custom repo methods
Eco CLI for Laravel .env syncing
Reducido núcleo de trabajo para PHP
A Slim Framework MVC skeleton application for rapid development
统计信息
- 总下载量: 728
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-14