Merge branch '2.7' into 2.8

* 2.7:
  [travis] Test on PHP 7.1
  [FrameworkBundle] Convert null prefix to an empty string in translation:update command
This commit is contained in:
Nicolas Grekas 2016-10-13 08:28:24 +02:00
commit 7108c375a2
2 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,7 @@ matrix:
- php: 5.6
- php: 7.0
env: deps=high
- php: 7.0
- php: 7.1
env: deps=low
fast_finish: true
@ -52,7 +52,7 @@ before_install:
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi
- if [[ ! $skip && $PHP = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.11 && echo apc.enable_cli = 1 >> $INI_FILE); fi
- if [[ ! $skip && $PHP = 7.0 ]]; then (echo yes | pecl install -f apcu-5.1.5 && echo apc.enable_cli = 1 >> $INI_FILE); fi
- if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.6 && echo apc.enable_cli = 1 >> $INI_FILE); fi
- if [[ ! $deps && $PHP = 5.* ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi
- if [[ ! $skip && $PHP = 5.* ]]; then pecl install -f memcached-2.1.0; fi
- if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = ldap.so >> $INI_FILE; fi

View File

@ -119,8 +119,9 @@ EOF
// load any messages from templates
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
$io->comment('Parsing templates...');
$prefix = $input->getOption('prefix');
$extractor = $this->getContainer()->get('translation.extractor');
$extractor->setPrefix($input->getOption('prefix'));
$extractor->setPrefix(null === $prefix ? '' : $prefix);
foreach ($transPaths as $path) {
$path .= 'views';
if (is_dir($path)) {