siler / app
运行一条命令即可设置现代 Siler 应用程序。
v1.1.2
2020-09-29 00:07 UTC
Requires
- hassankhan/config: ^2.1
- leocavalcante/siler: ^1.7.5
- monolog/monolog: ^2.1
Requires (Dev)
- pestphp/pest: ^0.3
- phpunit/phpunit: ^9.3
- ramsey/devtools: ^1.4
- roave/security-advisories: dev-master
- swoole/ide-helper: ^4.5
README
🧱 通过运行一条命令来设置现代 Siler 应用程序。
composer create-project siler/app my-app
脚本
composer start
运行 CLI SAPI 内置的 Web 服务器,端口为 8080。
composer swoole
运行 Swoole Web 服务器,端口为 9501。
docker-compose up
使用 Docker 和 Dwoole 运行 Docker,端口同样为 9501。
开发工具
它使用 ramsey/devtools
和 Pest 来覆盖 test:unit
。
analyze analyze:phpstan Runs the PHPStan static analyzer. analyze:psalm Runs the Psalm static analyzer. build build:clean Removes everything from the build directory that is not under version control. build:clear-cache Removes everything from build/cache that is not under version control. lint lint:fix Checks source code for coding standards issues and fixes them, if possible. test test:all Runs linting, static analysis, and unit tests. test:coverage:ci Runs the unit test suite and generates a Clover coverage report. test:coverage:html Runs the unit test suite and generates an HTML coverage report. test:unit Runs the unit test suite.
如何使用
bootstrap.php
是启动应用程序的好地方,比如数据库连接、依赖注入容器、设置等。
index.php
在每次请求时都会调用,是放置路由和依赖于当前请求的东西的好地方。