mainlycode / health-bundle
Symfony 扩展包,用于为您的应用程序添加 /health 端点
0.4.0
2024-06-18 08:43 UTC
Requires
- php: ^8.2
- symfony/http-foundation: ^5.4||^6.4||^7.0
Requires (Dev)
- phpunit/phpunit: ^10.4
- symfony/browser-kit: ^5.4||^6.4||^7.0
- symfony/framework-bundle: ^5.4||^6.4||^7.0
- symfony/yaml: ^5.4||^6.4||^7.0
README
Symfony 扩展包,用于为您的应用程序添加 /health 端点
安装
使用 Composer 安装包
composer require mainlycode/health-bundle
在应用程序中注册包 (config/bundles.php
)
return [ /** your other bundles */ MainlyCode\HealthBundle\HealthBundle::class => ['all' => true], ];
要向应用程序添加路由,请在 config/routing.yaml
中添加以下内容
health: resource: '@HealthBundle/config/routing.yaml'
或者如果您正在使用 PHP 导入路由
// config/routes.php use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return function (RoutingConfigurator $routes) { $routes->import('@HealthBundle/config/routing.yaml'); };