Command/StatusCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln(sprintf('Provider: <comment>%s</comment>', get_class($this->manager->getActiveProvider())));
        $formatter = $this->manager->getFormatter();
        if ($formatter instanceof FormatterInterface) {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', get_class($formatter)));
        } else {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', 'None'));
        }

        $version = $this->manager->getVersion();
        $newVersion = $this->manager->getVersionFromProvider();

        if ((string) $version == (string) $newVersion) {
            $output->writeln(sprintf('Current version: <info>%s</info>', $version));
        } else {
            $output->writeln(sprintf('Current version: <error>%s</error>', $version));
            $output->writeln(sprintf('New version: <info>%s</info>', $newVersion));
            $output->writeln(sprintf('<comment>%s</comment>', 'Version outdated, please run the cache:clear command'));
        }
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln(sprintf('Provider: <comment>%s</comment>', get_class($this->manager->getActiveProvider())));
        $formatter = $this->manager->getFormatter();
        if ($formatter instanceof FormatterInterface) {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', get_class($formatter)));
        } else {
            $output->writeln(sprintf('Formatter: <comment>%s</comment>', 'None'));
        }

        $version = $this->manager->getVersion();
        $newVersion = $this->manager->getVersionFromProvider();

        if ((string) $version == (string) $newVersion) {
            $output->writeln(sprintf('Current version: <info>%s</info>', $version));
        } else {
            $output->writeln(sprintf('Current version: <error>%s</error>', $version));
            $output->writeln(sprintf('New version: <info>%s</info>', $newVersion));
            $output->writeln(sprintf('<comment>%s</comment>', 'Version outdated, please run the cache:clear command'));
        }
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { $ output -> writeln ( sprintf ( 'Provider: <comment>%s</comment>' , get_class ( $ this -> manager -> getActiveProvider ( ) ) ) ) ; $ formatter = $ this -> manager -> getFormatter ( ) ; if ( $ formatter instanceof FormatterInterface ) { $ output -> writeln ( sprintf ( 'Formatter: <comment>%s</comment>' , get_class ( $ formatter ) ) ) ; } else { $ output -> writeln ( sprintf ( 'Formatter: <comment>%s</comment>' , 'None' ) ) ; } $ version = $ this -> manager -> getVersion ( ) ; $ newVersion = $ this -> manager -> getVersionFromProvider ( ) ; if ( ( string ) $ version == ( string ) $ newVersion ) { $ output -> writeln ( sprintf ( 'Current version: <info>%s</info>' , $ version ) ) ; } else { $ output -> writeln ( sprintf ( 'Current version: <error>%s</error>' , $ version ) ) ; $ output -> writeln ( sprintf ( 'New version: <info>%s</info>' , $ newVersion ) ) ; $ output -> writeln ( sprintf ( '<comment>%s</comment>' , 'Version outdated, please run the cache:clear command' ) ) ; } }
Show current application version status
Show current application version status