PartKeepr\CoreBundle\Services\VersionService::doVersionCheck PHP Method

doVersionCheck() public method

If a newer version was found, create a system notice entry.
public doVersionCheck ( )
    public function doVersionCheck()
    {
        if ($this->getVersion() === '{V_GIT}') {
            return;
        }
        if (substr($this->getVersion(), 0, 17) === 'partkeepr-nightly') {
            return;
        }
        $latestVersion = $this->getLatestVersion();
        if ($latestVersion === false) {
            return;
        }
        if (version_compare($this->getVersion(), $latestVersion['version'], '<')) {
            $this->systemNoticeService->createUniqueSystemNotice('PARTKEEPR_VERSION_' . $latestVersion['version'], $this->translator->trans('New PartKeepr Version %version% available', ['%version%' => $latestVersion['version']]), $this->translator->trans('PartKeepr Version %version% changelog:', ['%version%' => $latestVersion['version'] . "\n\n" . $latestVersion['changelog']]));
        }
    }