PHP code example of demroos / versioning-bundle

1. Go to this page and download the library: Download demroos/versioning-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

demroos / versioning-bundle example snippets



namespace App\Provider;

use Shivas\VersioningBundle\Provider\ProviderInterface;

class MyCustomProvider implements ProviderInterface
{

}


namespace App\Formatter;

use Shivas\VersioningBundle\Formatter\FormatterInterface;

class MyCustomFormatter implements FormatterInterface
{

}

# Twig template
{{ shivas_app_version }}

# Or get the version from the service
public function indexAction(VersionManager $manager)
{
    $version = $manager->getVersion();
}