Merge branch '2.3' into 2.7

* 2.3:
  [Console] Display console application name even when no version set
  Remove empty statements.
This commit is contained in:
Fabien Potencier 2016-01-14 09:26:43 +01:00
commit 5c29e717a2
4 changed files with 9 additions and 5 deletions

View File

@ -13,7 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;;
use Symfony\Component\DependencyInjection\Extension\Extension;
class FormLoginExtension extends Extension
{

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\Extension\Extension;;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;

View File

@ -309,8 +309,12 @@ class Application
*/
public function getLongVersion()
{
if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) {
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
if ('UNKNOWN' !== $this->getName()) {
if ('UNKNOWN' !== $this->getVersion()) {
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
}
return sprintf('<info>%s</info>', $this->getName());
}
return '<info>Console Tool</info>';

View File

@ -52,7 +52,7 @@ class MockSplFileInfo extends \SplFileInfo
{
if (null === $this->type) {
return false !== strpos($this->getFilename(), 'file');
};
}
return self::TYPE_FILE === $this->type;
}