kod/slim-skeleton
Composer 安装命令:
composer create-project kod/slim-skeleton
包简介
A Slim Framework 3 skeleton
README 文档
README
This application skeleton is a new refreshing look on Slim project structure. It allows you to quickly setup a new project and start working on your business requirements.
It comes with latest Slim 3 and it's PHP-View template renderer, logger, helper classes to facilitate your work with unit tests and sample classes to help you to start on. This skeleton is built on kod/bootstrap-slim package which makes your development process easier and your code more organized.
Adepts of MVC approach will find a ready to use MVC structure and classes. And if you are not a fun of MVC you can go with classical Slim functional programming. Simply remove MVC folder from your project.
Create new project
Run following commands from the directory in which you want to setup your new project. Do not forget to replace [you-app-name] with the desired directory name for your application.
composer create-project kod/slim-skeleton [you-app-name] cd [you-app-name] # install dependencies composer install # start php server composer run start --timeout=0 # Open the browser and go to http://localhost:8099/ to see the sample page
If the port :8099 is taken by another program update composer.json and set another value for the port in start command.
Server configuration
The document root of your project's virtual host must point to src/public directory.
Logger
Default format is a json format. If the application is executed with php built-in server logger will write logs to stdout. If it's run on the server (apache/nginx) it will write to var/debug.log. Ensure this directory is writable by the server. For logger configuration see logger settings.
Composer Commands
| command | usage | description |
|---|---|---|
| start | composer run start --timeout=0 | start the php built-in server |
| phpcs | composer phpcs | run php code style check (uses PSR2 requirements) |
| phpcs-fix | composer phpcs-fix | fix code style errors and warning |
| phpunit | composer phpunit | run unit tests |
| phpunit-cover | composer phpunit-cover | run unit tests with coverage report (available in ./coverage folder) |
| test | composer test | run code style check and unit tests |
Have fun!
kod/slim-skeleton 适用场景与选型建议
kod/slim-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 12 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 kod/slim-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kod/slim-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-10