8000 Fix PHP 7.1 related failures by nicolas-grekas · Pull Request #19384 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix PHP 7.1 related failures #19384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix PHP 7.1 related failures
  • Loading branch information
nicolas-grekas committed Jul 19, 2016
commit 07467ed3a3aca5bd8760060e4472cf519b7812c5
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ matrix:
- php: 5.4
- php: 5.5
- php: 5.6
env: deps=high
- php: 7.0
env: deps=high
- php: 7.1
env: deps=low
fast_finish: true

Expand All @@ -50,13 +51,12 @@ before_install:
- if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi
- 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.10 && echo apc.enable_cli = 1 >> $INI_FILE); fi
- if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apcu on 7.1 segfaults for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you reported it ?

- 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
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini; fi
- if [[ ! $skip ]]; then composer self-update --stable; fi
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
- if [[ ! $skip ]]; then cp .composer/* ~/.composer/; fi
- if [[ ! $skip ]]; then ./phpunit install; fi
- if [[ ! $skip ]]; then export PHPUNIT=$(readlink -f ./phpunit); fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ class ProjectServiceContainer extends Container
}
}

class stdClass_%s extends \stdClass implements \ProxyManager\%s
{%a}%A
class stdClass_%s extends %SstdClass implements \ProxyManager\%s
{%a}%A
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"symfony/security-acl": "~2.6",
"symfony/stopwatch": "~2.2",
"symfony/console": "~2.7",
"symfony/var-dumper": "~2.6",
"symfony/var-dumper": "~2.7.16|~2.8.9",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be ~2.8.9|~3.0.9|~3.1.3|~3.2 when merging in 3.0

"symfony/expression-language": "~2.4"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private function fillNextRows($rows, $line)
}

// create a two dimensional array (rowspan x colspan)
$unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, ''), $unmergedRows);
$unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows);
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
$value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : '';
$unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testCrossCheck($fixture, $type)
$loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\'.ucfirst($type).'FileLoader';
$dumperClass = 'Symfony\\Component\\DependencyInjection\\Dumper\\'.ucfirst($type).'Dumper';

$tmp = tempnam('sf_service_container', 'sf');
$tmp = tempnam(sys_get_temp_dir(), 'sf');

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

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/DependencyInjection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"php": ">=5.3.9"
},
"require-dev": {
"symfony/yaml": "~2.1",
"symfony/yaml": "~2.3.42|~2.7.14|~2.8.7",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be ~2.8.7|~3.0.7|~3.1.1|~3.2 when merging in 3.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.0.9 and 3.1.3, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.0.7&3.1.1 here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #18861

"symfony/config": "~2.2",
"symfony/expression-language": "~2.6"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/Util/OrderedHashMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function offsetSet($key, $value)
? 0
// Imitate PHP's behavior of generating a key that equals
// the highest existing integer key + 1
: max($this->orderedKeys) + 1;
: 1 + (int) max($this->orderedKeys);
}

$this->orderedKeys[] = $key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class CacheWarmer implements CacheWarmerInterface
{
protected function writeCacheFile($file, $content)
{
$tmpFile = tempnam(dirname($file), basename($file));
$tmpFile = @tempnam(dirname($file), basename($file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
@chmod($file, 0666 & ~umask());

Expand Down
12 changes: 7 additions & 5 deletions src/Symfony/Component/Validator/Constraints/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,22 @@ public function __get($option)

private function normalizeBinaryFormat($maxSize)
{
$sizeInt = (int) $maxSize;

if (ctype_digit((string) $maxSize)) {
$this->maxSize = (int) $maxSize;
$this->maxSize = $sizeInt;
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
} elseif (preg_match('/^\d++k$/i', $maxSize)) {
$this->maxSize = $maxSize * 1000;
$this->maxSize = $sizeInt * 1000;
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
} elseif (preg_match('/^\d++M$/i', $maxSize)) {
$this->maxSize = $maxSize * 1000000;
$this->maxSize = $sizeInt * 1000000;
$this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat;
} elseif (preg_match('/^\d++Ki$/i', $maxSize)) {
$this->maxSize = $maxSize << 10;
$this->maxSize = $sizeInt << 10;
$this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat;
} elseif (preg_match('/^\d++Mi$/i', $maxSize)) {
$this->maxSize = $maxSize << 20;
$this->maxSize = $sizeInt << 20;
$this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat;
} else {
throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize));
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"doctrine/common": "~2.3",
"symfony/http-foundation": "~2.1",
"symfony/http-foundation": "~2.3",
"symfony/intl": "~2.7.4|~2.8",
"symfony/yaml": "~2.0,>=2.0.5",
"symfony/config": "~2.2",
Expand Down
0