diff --git a/.travis.yml b/.travis.yml index 4eba528ca..bb2741623 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - hhvm - nightly diff --git a/lib/Doctrine/Connection/UnitOfWork.php b/lib/Doctrine/Connection/UnitOfWork.php index 25b34bcfe..9627d6d19 100644 --- a/lib/Doctrine/Connection/UnitOfWork.php +++ b/lib/Doctrine/Connection/UnitOfWork.php @@ -237,7 +237,7 @@ private function _executeDeletions(array $deletions) $params = array(); $columnNames = array(); foreach ($identifierMaps as $idMap) { - while (list($fieldName, $value) = each($idMap)) { + foreach($idMap as $fieldName => $value) { $params[] = $value; $columnNames[] = $table->getColumnName($fieldName); } @@ -957,4 +957,4 @@ protected function _assignIdentifier(Doctrine_Record $record) $record->assignIdentifier(true); } } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/Graph.php b/lib/Doctrine/Hydrator/Graph.php index 726aed31f..3c4b845e7 100644 --- a/lib/Doctrine/Hydrator/Graph.php +++ b/lib/Doctrine/Hydrator/Graph.php @@ -256,7 +256,7 @@ public function hydrateResultSet($stmt) } else if ( ! isset($prev[$parent][$relationAlias])) { $element = $this->getElement($data, $componentName); - // [FIX] Tickets #1205 and #1237 + // [FIX] Tickets #1205 and #1237 $event->set('data', $element); $listeners[$componentName]->postHydrate($event); $instances[$componentName]->postHydrate($event); @@ -409,7 +409,7 @@ protected function _getClassnameToReturn(array &$data, $component) $needMatches = count($inheritanceMap); foreach ($inheritanceMap as $key => $value) { $key = $this->_tables[$component]->getFieldName($key); - if ( isset($data[$key]) && $data[$key] == $value) { + if (isset($data[$key]) && $data[$key] == $value) { --$needMatches; } } @@ -417,12 +417,13 @@ protected function _getClassnameToReturn(array &$data, $component) $matchedComponents[] = $table->getComponentName(); } } else { - list($key, $value) = each($inheritanceMap); - $key = $this->_tables[$component]->getFieldName($key); - if ( ! isset($data[$key]) || $data[$key] != $value) { - continue; - } else { - $matchedComponents[] = $table->getComponentName(); + foreach ($inheritanceMap as $key => $value) { + $key = $this->_tables[$component]->getFieldName($key); + if (!isset($data[$key]) || $data[$key] != $value) { + continue; + } else { + $matchedComponents[] = $table->getComponentName(); + } } } }