shivas / versioning-bundle

Simple way to version (semantic versioning 2.0.0) your Symfony2/3/4/5/6 application
MIT License
111 stars 30 forks source link

How do you configure for non-flex Symfony apps (symfony:2.0+) #48

Closed lampelk closed 5 years ago

lampelk commented 5 years ago

Don't have flex installed - is it even possible to enable for non-flex apps?

Got a legacy app here, its big but as we incrementally upgrade it to 4+ (collectively) we would love to use this bundle to call an API endpoint that simple returns the version of the app (build actually).

Got it set up but had to do a manual and add this to the AppKernel.php:

new Shivas\VersioningBundle\ShivasVersioningBundle() 

controller:

public function getAction(VersionManager $manager)
    {
        return $manager->getVersion();
    }

But getting the following error:

getAction()" requires that you provide a value for the "$manager" argument

lampelk commented 5 years ago

Fixed by enabling autowire=true on controller in services.yml