ycw / ycw-test-bundle
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:symfony-bundle
Requires
- php: ^7.1.3
- symfony/framework-bundle: 4.2.*
- symfony/orm-pack: *
Conflicts
This package is auto-updated.
Last update: 2025-04-16 22:39:02 UTC
README
开发配置
第一步:克隆项目http://git.cqxiaokang.local/yuchangwei/ycw-test-bundle.git
到框架的根目录下,命名为ycw-test-bundle
;
第二步:在composer.json
中添加以下配置:
"autoload": {
"psr-4": {
"Ycw\\TestBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Ycw\\TestBundle\\Tests\\": "Tests/"
}
然后更新composer的自动加载代码:
composer update nothing
第三步:在/config/bundles.php
添加以下代码:
Ycw\TestBundle\YcwTestBundle::class => ['all' => true],
第四步:在/config/routes/
目录中添加文件ycw_test.yaml
ycw_test.yaml 路由如下:
ycw_test:
prefix: /
resource: '@YcwTestBundle/Resources/config/routing.yaml'
配置完成,执行命令bin/console debug:route
查看路由设置3;