8000 Merge branch '2.7' into 2.8 · symfony/symfony@15ab32b · GitHub
[go: up one dir, main page]

Skip to content

Commit 15ab32b

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Fix PHP 7.1 related failures [VarDumper] Fix for 7.1
2 parents 00ab2d6 + 37cd583 commit 15ab32b

File tree

11 files changed

+22
-20
lines changed

11 files changed

+22
-20
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ matrix:
2626
- php: 5.4
2727
- php: 5.5
2828
- php: 5.6
29-
env: deps=high
3029
- php: 7.0
30+
env: deps=high
31+
- php: 7.1
3132
env: deps=low
3233
fast_finish: true
3334

@@ -50,13 +51,12 @@ before_install:
5051
- if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi
5152
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi
5253
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi
53-
- if [[ ! $skip && $PHP = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE); fi
54-
- if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $INI_FILE); fi
54+
- 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
5556
- 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
5657
- if [[ ! $skip && $PHP = 5.* ]]; then pecl install -f memcached-2.1.0; fi
5758
- if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = ldap.so >> $INI_FILE; fi
58-
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini; fi
59-
- if [[ ! $skip ]]; then composer self-update --stable; fi
59+
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
6060
- if [[ ! $skip ]]; then cp .composer/* ~/.composer/; fi
6161
- if [[ ! $skip ]]; then ./phpunit install; fi
6262
- if [[ ! $skip ]]; then export PHPUNIT=$(readlink -f ./phpunit); fi

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ class ProjectServiceContainer extends Container
2323
}
2424
}
2525

26-
class stdClass_%s extends \stdClass implements \ProxyManager\%s
27-
{%a}%A
26+
class stdClass_%s extends %SstdClass implements \ProxyManager\%s
27+
{%a}%A

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"symfony/security-acl": "~2.6|~3.0.0",
3434
"symfony/stopwatch": "~2.2|~3.0.0",
3535
"symfony/console": "~2.8|~3.0.0",
36-
"symfony/var-dumper": "~2.6|~3.0.0",
36+
"symfony/var-dumper": "~2.7.16|~2.8.9|~3.0.9",
3737
"symfony/expression-language": "~2.4|~3.0.0"
3838
},
3939
"suggest": {

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ private function fillNextRows($rows, $line)
448448
}
449449

450450
// create a two dimensional array (rowspan x colspan)
451-
$unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, ''), $unmergedRows);
451+
$unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows);
452452
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
453453
$value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : '';
454454
$unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan()));

src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testCrossCheck($fixture, $type)
3434
$loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\'.ucfirst($type).'FileLoader';
3535
$dumperClass = 'Symfony\\Component\\DependencyInjection\\Dumper\\'.ucfirst($type).'Dumper';
3636

37-
$tmp = tempnam('sf_service_container', 'sf');
37+
$tmp = tempnam(sys_get_temp_dir(), 'sf');
3838

3939
file_put_contents($tmp, file_get_contents(self::$fixturesPath.'/'.$type.' 8000 /'.$fixture));
4040

src/Symfony/Component/DependencyInjection/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=5.3.9"
2020
},
2121
"require-dev": {
22-
"symfony/yaml": "~2.1|~3.0.0",
22+
"symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.9",
2323
"symfony/config": "~2.2|~3.0.0",
2424
"symfony/expression-language": "~2.6|~3.0.0"
2525
},

src/Symfony/Component/Form/Util/OrderedHashMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function offsetSet($key, $value)
130130
? 0
131131
// Imitate PHP's behavior of generating a key that equals
132132
// the highest existing integer key + 1
133-
: max($this->orderedKeys) + 1;
133+
: 1 + (int) max($this->orderedKeys);
134134
}
135135

136136
$this->orderedKeys[] = $key;

src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class CacheWarmer implements CacheWarmerInterface
2020
{
2121
protected function writeCacheFile($file, $content)
2222
{
23-
$tmpFile = tempnam(dirname($file), basename($file));
23+
$tmpFile = @tempnam(dirname($file), basename($file));
2424
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
2525
@chmod($file, 0666 & ~umask());
2626

src/Symfony/Component/Validator/Constraints/File.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,22 @@ public function __get($option)
8888

8989
private function normalizeBinaryFormat($maxSize)
9090
{
91+
$sizeInt = (int) $maxSize;
92+
9193
if (ctype_digit((string) $maxSize)) {
92-
$this->maxSize = (int) $maxSize;
94+
$this->maxSize = $sizeInt;
9395
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
9496
} elseif (preg_match('/^\d++k$/i', $maxSize)) {
95-
$this->maxSize = $maxSize * 1000;
97+
$this->maxSize = $sizeInt * 1000;
9698
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
9799
} elseif (preg_match('/^\d++M$/i', $maxSize)) {
98-
$this->maxSize = $maxSize * 1000000;
100+
$this->maxSize = $sizeInt * 1000000;
99101
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
100102
} elseif (preg_match('/^\d++Ki$/i', $maxSize)) {
101-
$this->maxSize = $maxSize << 10;
103+
$this->maxSize = $sizeInt << 10;
102104
$this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat;
103105
} elseif (preg_match('/^\d++Mi$/i', $maxSize)) {
104-
$this->maxSize = $maxSize << 20;
106+
$this->maxSize = $sizeInt << 20;
105107
$this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat;
106108
} else {
107109
throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize));

src/Symfony/Component/Validator/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/translation": "~2.4|~3.0.0"
2222
},
2323
"require-dev": {
24-
"symfony/http-foundation": "~2.1|~3.0.0",
24+
"symfony/http-foundation": "~2.3|~3.0.0",
2525
"symfony/intl": "~2.7.4|~2.8|~3.0.0",
2626
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
2727
"symfony/config": "~2.2|~3.0.0",

src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ private static function initHashMask()
315315
if (!empty($frame['line'])) {
316316
ob_start();
317317
debug_zval_dump($obj);
318-
self::$hashMask = substr(ob_get_clean(), 17);
318+
self::$hashMask = (int) substr(ob_get_clean(), 17);
319319
}
320320
}
321321

0 commit comments

Comments
 (0)
0