Aimeos\ShopBundle\Service\Aimeos::getVersion PHP Method

getVersion() public method

Returns the version of the Aimeos package
public getVersion ( ) : string
return string Version string
    public function getVersion()
    {
        $filename = dirname($this->container->get('kernel')->getRootDir()) . DIRECTORY_SEPARATOR . 'composer.lock';
        if (file_exists($filename) === true && ($content = file_get_contents($filename)) !== false && ($content = json_decode($content, true)) !== null && isset($content['packages'])) {
            foreach ((array) $content['packages'] as $item) {
                if ($item['name'] === 'aimeos/aimeos-symfony') {
                    return $item['version'];
                }
            }
        }
        return '';
    }