Merge pull request #7281 from sminnee/test-php72

NEW: Test on php 7.2
This commit is contained in:
Daniel Hensby 2017-08-18 21:22:10 +01:00 committed by GitHub
commit 304889ff2f
3 changed files with 15 additions and 10 deletions

View File

@ -36,6 +36,11 @@ matrix:
- DB=MYSQL - DB=MYSQL
- PDO=1 - PDO=1
- PHPUNIT_COVERAGE_TEST=framework - PHPUNIT_COVERAGE_TEST=framework
- php: 7.2
env:
- DB=MYSQL
- PDO=1
- PHPUNIT_TEST=framework
- php: 7.0 - php: 7.0
env: env:
- DB=MYSQL - DB=MYSQL
@ -54,7 +59,7 @@ before_script:
- export CORE_RELEASE=$TRAVIS_BRANCH - export CORE_RELEASE=$TRAVIS_BRANCH
- printf "\n" | pecl install imagick - printf "\n" | pecl install imagick
- phpenv rehash - phpenv rehash
- phpenv config-rm xdebug.ini - phpenv config-rm xdebug.ini || true
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Temporarily update to 1.5.x-dev of composer # Temporarily update to 1.5.x-dev of composer

View File

@ -807,8 +807,8 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
if ($relObj->$relation() instanceof DataObject) { if ($relObj->$relation() instanceof DataObject) {
$parentObj = $relObj; $parentObj = $relObj;
$relObj = $relObj->$relation(); $relObj = $relObj->$relation();
// If the intermediate relationship objects have been created, then write them // If the intermediate relationship objects haven't been created, then write them
if ($i<sizeof($relation)-1 && !$relObj->ID || (!$relObj->ID && $parentObj !== $this)) { if ($i<sizeof($relations)-1 && !$relObj->ID || (!$relObj->ID && $parentObj !== $this)) {
$relObj->write(); $relObj->write();
$relatedFieldName = $relation."ID"; $relatedFieldName = $relation."ID";
$parentObj->$relatedFieldName = $relObj->ID; $parentObj->$relatedFieldName = $relObj->ID;

View File

@ -418,7 +418,7 @@ class DiffEngine
$i = 0; $i = 0;
$j = 0; $j = 0;
assert('sizeof($lines) == sizeof($changed)'); assert(sizeof($lines) == sizeof($changed));
$len = sizeof($lines); $len = sizeof($lines);
$other_len = sizeof($other_changed); $other_len = sizeof($other_changed);
@ -438,7 +438,7 @@ class DiffEngine
$j++; $j++;
while ($i < $len && !$changed[$i]) { while ($i < $len && !$changed[$i]) {
assert('$j < $other_len && ! $other_changed[$j]'); assert($j < $other_len && ! $other_changed[$j]);
$i++; $i++;
$j++; $j++;
while ($j < $other_len && $other_changed[$j]) while ($j < $other_len && $other_changed[$j])
@ -471,10 +471,10 @@ class DiffEngine
$changed[--$i] = false; $changed[--$i] = false;
while ($start > 0 && $changed[$start - 1]) while ($start > 0 && $changed[$start - 1])
$start--; $start--;
assert('$j > 0'); assert($j > 0);
while ($other_changed[--$j]) while ($other_changed[--$j])
continue; continue;
assert('$j >= 0 && !$other_changed[$j]'); assert($j >= 0 && !$other_changed[$j]);
} }
/* /*
@ -497,7 +497,7 @@ class DiffEngine
while ($i < $len && $changed[$i]) while ($i < $len && $changed[$i])
$i++; $i++;
assert('$j < $other_len && ! $other_changed[$j]'); assert($j < $other_len && ! $other_changed[$j]);
$j++; $j++;
if ($j < $other_len && $other_changed[$j]) { if ($j < $other_len && $other_changed[$j]) {
$corresponding = $i; $corresponding = $i;
@ -514,10 +514,10 @@ class DiffEngine
while ($corresponding < $i) { while ($corresponding < $i) {
$changed[--$start] = 1; $changed[--$start] = 1;
$changed[--$i] = 0; $changed[--$i] = 0;
assert('$j > 0'); assert($j > 0);
while ($other_changed[--$j]) while ($other_changed[--$j])
continue; continue;
assert('$j >= 0 && !$other_changed[$j]'); assert($j >= 0 && !$other_changed[$j]);
} }
} }
} }