diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php index d63a05e8da..7dfe5d0288 100644 --- a/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -243,9 +243,7 @@ public function getFormOptions(array $database) { ]; global $install_state; - // @todo the use of the coalesce operator below is needed to get - // migrate_drupal_ui tests pass on PHP 7.4. - $profile = $install_state['parameters']['profile'] ?? NULL; + $profile = $install_state['parameters']['profile']; $db_prefix = ($profile == 'standard') ? 'drupal_' : $profile . '_'; $form['advanced_options']['prefix'] = [ '#type' => 'textfield', diff --git a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php index 5417dabc4a..74340884d2 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php @@ -181,9 +181,7 @@ public function prepareRow(Row $row) { } $field_data = unserialize($row->getSourceProperty('field_data')); - // @todo the use of the coalesce operator below is needed to get - // migrate tests pass on PHP 7.4. - $row->setSourceProperty('field_settings', $field_data['settings'] ?? NULL); + $row->setSourceProperty('field_settings', $field_data['settings']); return parent::prepareRow($row); } diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 7bfce52add..37c4522092 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -385,16 +385,12 @@ function locale_translate_batch_finished($success, array $results) { // file), simply do nothing. if ($results && isset($results['stats'])) { foreach ($results['stats'] as $filepath => $report) { - // @todo is_array check below is needed to get locale tests pass on - // PHP 7.4. - if (is_array($report)) { - $additions += $report['additions']; - $updates += $report['updates']; - $deletes += $report['deletes']; - $skips += $report['skips']; - if ($report['skips'] > 0) { - $skipped_files[] = $filepath; - } + $additions += $report['additions']; + $updates += $report['updates']; + $deletes += $report['deletes']; + $skips += $report['skips']; + if ($report['skips'] > 0) { + $skipped_files[] = $filepath; } } } diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php index e8f15f6b9e..844fb858b5 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php @@ -70,9 +70,7 @@ public function prepareRow(Row $row) { $query->condition('lt.language', $language); $query->addField('lt', 'translation'); $results = $query->execute()->fetchAssoc(); - // @todo the use of the coalesce operator below is needed to get - // migrate tests pass on PHP 7.4. - $row->setSourceProperty($other_property . '_translated', $results['translation'] ?? NULL); + $row->setSourceProperty($other_property . '_translated', $results['translation']); parent::prepareRow($row); } diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index baa27b70f4..b7d1821bfd 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -182,10 +182,7 @@ protected function opBetween($field) { } protected function opSimple($field) { - // @todo $this->value['value'] should always be defined, but it's not - // and that's leading to test failures in PHP 7.4. Figure out a more - // robust solution rather than coalescing to NULL. - $value = intval(strtotime($this->value['value'] ?? NULL, 0)); + $value = intval(strtotime($this->value['value'], 0)); if (!empty($this->value['type']) && $this->value['type'] == 'offset') { // Keep sign. $value = '***CURRENT_TIME***' . sprintf('%+d', $value); diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index 4f9680ec57..05d0cc8979 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -354,10 +354,7 @@ protected function opBetween($field) { } protected function opSimple($field) { - // @todo $this->value['value'] should always be defined, but it's not - // and that's leading to test failures in PHP 7.4. Figure out a more - // robust solution rather than coalescing to NULL. - $this->query->addWhere($this->options['group'], $field, $this->value['value'] ?? NULL, $this->operator); + $this->query->addWhere($this->options['group'], $field, $this->value['value'], $this->operator); } protected function opEmpty($field) { diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php index 1788ec63a7..a0bbedf731 100644 --- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php @@ -263,11 +263,7 @@ public function buildJoin($select_query, $table, $view_query) { if ($this->leftTable) { $left_table = $view_query->getTableInfo($this->leftTable); - // @todo $left_table['alias'] should always be defined, but it's not - // and that's leading to test failures in PHP 7.4. Figure out a more - // robust solution rather than coalescing to NULL. - $left_table_alias = $left_table['alias'] ?? NULL; - $left_field = "$left_table_alias.$this->leftField"; + $left_field = "$left_table[alias].$this->leftField"; } else { // This can be used if left_field is a formula or something. It should be used only *very* rarely. @@ -385,11 +381,7 @@ protected function buildExtra($info, &$arguments, $table, SelectInterface $selec // Allow the value to be set either with the 'value' element or // with 'left_field'. if (isset($info['left_field'])) { - // @todo $left['alias'] should always be defined, but it's not - // and that's leading to test failures in PHP 7.4. Figure out a more - // robust solution rather than coalescing to NULL. - $left_alias = $left['alias'] ?? NULL; - $placeholder_sql = "$left_alias.$info[left_field]"; + $placeholder_sql = "$left[alias].$info[left_field]"; } else { $arguments[$placeholder] = $info['value'];