ikoene/symfony-micro
Composer 安装命令:
composer create-project ikoene/symfony-micro
包简介
Symfony 3 Micro Trait application
README 文档
README
Symfony micro-framework
Use Symfony as a microframework.
Installation
Create a new project with Composer.
composer create-project ikoene/symfony-micro
MicroKernelTrait
The MicroKernelTrait allows you to create a fully-functional Symfony application in as little as one file. It allows you to start with a tiny application, and then add features and structure as you need to. Its goal to give you the power to choose your bundles and structure. Since you're only enabling features and bundles you're actually going to use, your application gets a performance boost in comparison with using the Symfony full-stack framework.
Bundles
These bundles are registered in the MicroKernel:
While you could argue what exactly should and should not be included in a microframework, I found myself always using these bundles. So they're enabled by default. Don't want to use Twig as your template engine? Remove it in the MicroKernel.
When working in a dev or test environment, the MicroKernel also registers the necesarry bundles to be able to debug your project:
Usage
Development
Build your application in the AppBundle. You're free to structure your application as you want, but following the typical Symfony bundle structure has it's advantages. For one, it would be easier to migrate to a full-stack Symfony project if your application grows too big.
But, as I said, the choice is yours.
Register bundles
Missing some features? Register your bundles in the MicroKernel:
... $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new AppBundle\AppBundle(), ); ...
Console
While this is a microframework, chances are you'll still need the console. Use it like this:
./console
PHPUnit Testing
Run all tests with this command:
bin/phpunit -c .
Additional info
ikoene/symfony-micro 适用场景与选型建议
ikoene/symfony-micro 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 224 次下载、GitHub Stars 达 35, 最近一次更新时间为 2015 年 12 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ikoene/symfony-micro 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ikoene/symfony-micro 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 224
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-15