hmazter/console-skeleton
Composer 安装命令:
composer create-project hmazter/console-skeleton
包简介
Skeleton for a console application with DI-container and yaml-config
README 文档
README
Skeleton for a console application, including:
- DI-Container
- Services and commands autowired in yaml-config
- Example Command
- Example test
- Phar Builder
Getting started
This will create a new project with the skeleton for a console application:
composer create-project hmazter/console-skeleton the-new-app-name
cd the-new-app-name
The skeleton can then be executed with:
./app
Building distributable phar
A phar-file that can be distributed can be built with:
composer build
This will output the phar-file in the project root, named <project-directory-name>.phar.
Running with docker
Build the app with:
docker-compose build
And run the app with docker with this command:
docker-compose run console ./app
Tests
Tests can be run with:
composer test
Static Code analyse
Code can be static analysed with PHPStan:
composer analyse
Continue building
Go ahead and:
- Edit/replace command in src/Commad/ExampleCommand
- Add more commands in src/Command
- Add additional classes that you need in src/
- Edit/replace the test in tests/Command/ExampleCommandTest
统计信息
- 总下载量: 63
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-14