vysokeskoly/app-status-bundle

This bundle adds a `Collector` which adds build info into your Symfony profiler.

Installs: 9 005

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

7.1.0 2024-10-25 13:11 UTC

This package is auto-updated.

Last update: 2024-10-25 13:11:42 UTC


README

Latest Stable Version License Checks Build Coverage Status

This bundle adds a Collector which adds buildinfo into your Symfony profiler.

Changelog

See CHANGELOG.md.

Install

Step 1

Download using composer

"require": {
    "vysokeskoly/app-status-bundle" : "^5.0"
},

Step 2

Add AppStatusBundle to AppKernel to list of loaded bundles (under dev bundles).

AppKernel.php

public function registerBundles()
{
    $bundles = [
        ...
    ];
    
    if (in_array($this->getEnvironment(), array('dev'))) {
        ...
        $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
        $bundles[] = new VysokeSkoly\AppStatusBundle\VysokeSkolyAppStatusBundle();
        ...
    }
}

Step 3

Configure required parameters for this bundle.

config.yml

    # AppStatus Bundle
    vysoke_skoly_app_status:
        source_file: "PATH_TO_BUILDINFO.XML"
        main_status_key: "MAIN_STATUS_KEY"

source_file

You can specify source_file which is XML file with package info. Default value is var/buildinfo.xml.

<?xml version="1.0" encoding="UTF-8" ?>
<appStatus>
    <name>app-status</name>
    <version>2017.03.08.16.30.28-68.gad10e8af8</version>
    <sourceRevision>ad10e8af8814f825e36e629ab1a19c5078a6d257</sourceRevision>
    <repository>
        ssh://git/app-status-bundle.git
    </repository>
    <buildNumber>666</buildNumber>
    <buildBranch>feature/app-status-bundle</buildBranch>
    <buildUrl>https://jenkins/job/app-status/666/</buildUrl>
    <project>app_status_bundle</project>
    <hostName>__HOSTNAME__</hostName>
</appStatus>

main_status_key

This is an optional property which tells the collector that you want to see one of status values right in the profiler. Default value is buildBranch