Skip to content

Commit 7108c37

Browse files
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
2 parents aaab30e + ab6f181 commit 7108c37

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ matrix:
2828
- php: 5.6
2929
- php: 7.0
3030
env: deps=high
31-
- php: 7.0
31+
- php: 7.1
3232
env: deps=low
3333
fast_finish: true
3434

@@ -52,7 +52,7 @@ before_install:
5252
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi
5353
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi
5454
- if [[ ! $skip && $PHP = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.11 && echo apc.enable_cli = 1 >> $INI_FILE); fi
55-
- if [[ ! $skip && $PHP = 7.0 ]]; then (echo yes | pecl install -f apcu-5.1.5 && echo apc.enable_cli = 1 >> $INI_FILE); fi
55+
- if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.6 && echo apc.enable_cli = 1 >> $INI_FILE); fi
5656
- 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
5757
- if [[ ! $skip && $PHP = 5.* ]]; then pecl install -f memcached-2.1.0; fi
5858
- if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = ldap.so >> $INI_FILE; fi

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
119119
// load any messages from templates
120120
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
121121
$io->comment('Parsing templates...');
122+
$prefix = $input->getOption('prefix');
122123
$extractor = $this->getContainer()->get('translation.extractor');
123-
$extractor->setPrefix($input->getOption('prefix'));
124+
$extractor->setPrefix(null === $prefix ? '' : $prefix);
124125
foreach ($transPaths as $path) {
125126
$path .= 'views';
126127
if (is_dir($path)) {

0 commit comments

Comments
 (0)