Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 37cd583

Browse filesBrowse files
committed
bug #19384 Fix PHP 7.1 related failures (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- Fix PHP 7.1 related failures | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - PHP 7.1 triggers notices on previously silent implicit type changes. Commits ------- 07467ed Fix PHP 7.1 related failures
2 parents 37b299b + 07467ed commit 37cd583
Copy full SHA for 37cd583

File tree

10 files changed

+21
-19
lines changed
Filter options

10 files changed

+21
-19
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+5-5Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"symfony/security-acl": "~2.6",
3434
"symfony/stopwatch": "~2.2",
3535
"symfony/console": "~2.7",
36-
"symfony/var-dumper": "~2.6",
36+
"symfony/var-dumper": "~2.7.16|~2.8.9",
3737
"symfony/expression-language": "~2.4"
3838
},
3939
"suggest": {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/Table.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ private function fillNextRows($rows, $line)
396396
}
397397

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

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php
+1-1Lines 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.'/'.$fixture));
4040

‎src/Symfony/Component/DependencyInjection/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/composer.json
+1-1Lines 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",
22+
"symfony/yaml": "~2.3.42|~2.7.14|~2.8.7",
2323
"symfony/config": "~2.2",
2424
"symfony/expression-language": "~2.6"
2525
},

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Util/OrderedHashMap.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/File.php
+7-5Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require-dev": {
2323
"doctrine/common": "~2.3",
24-
"symfony/http-foundation": "~2.1",
24+
"symfony/http-foundation": "~2.3",
2525
"symfony/intl": "~2.7.4|~2.8",
2626
"symfony/yaml": "~2.0,>=2.0.5",
2727
"symfony/config": "~2.2",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.