3slab / vdm-version-bundle
Provides a simple and standardized way to expose application version in a route
Installs: 913
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.2
- symfony/framework-bundle: ^5.4|^6.4
Requires (Dev)
- phpunit/phpunit: ^8
- squizlabs/php_codesniffer: 3.*
- symfony/browser-kit: ^5.4
- symfony/yaml: ^5.4
This package is auto-updated.
Last update: 2024-11-28 23:40:00 UTC
README
This bundle provides a simple and standardized way to expose application version in a route.
Installation
composer require 3slab/vdm-version-bundle
And load the routes in routing.yml
:
vdm_version: resource: "@VdmVersionBundle/Resources/config/routing.yml" prefix: /
Configuration
Put your configuration in config/packages/vdm_version.yaml
file. This is the default :
vdm_version: secret: ~ path: /version versions: ~
You configure the versions of the different services of your app by providing an array where the keys are the services names and the values the versions names.
vdm_version: versions: frontend: '1.0' backend: '1.1'
When querying the /version
endpoint, it returns the following response :
{"frontend":"1.0","backend":"1.1"}