forelse/version-bundle

Manage your application version

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

0.0.1 2023-01-11 16:53 UTC

This package is auto-updated.

Last update: 2024-04-11 20:28:30 UTC


README

This bundle allows to load the version number of the application by reading the version.yaml file in the config/packages folder

Setup

Use composer to install

composer require forelse/version-bundle

Configuration

You can customize the parameter bag key in the yaml configuration file.

version:
  app_version: 1.0.0.0
  parameterbag_key: app.version

Usage

The version number of the application is then available in the ParameterBag

class IndexController extends AbstractController
{
    /**
     * @Route("/", name="home")
     */
    public function index(ParameterBagInterface $parameterBag): Response
    {
        $version = $parameterBag->get('app.version');
    }
}