diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1128,7 +1128,7 @@ // \Drupal\Core\Render\Element::children(), which cannot be used // here, since it triggers an error on string values. foreach ($child as $child_key => $child_value) { - if (is_integer($child_key) || $child_key[0] !== '#') { + if (is_int($child_key) || $child_key[0] !== '#') { $child['#items'][$child_key] = $child_value; unset($child[$child_key]); } diff -u b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php --- b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php +++ b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php @@ -990,7 +990,7 @@ { $peek = $this->lexer->glimpse(); - if (!empty($peek) && DocLexer::T_EQUALS === $peek['type']) { + if ($peek !== NULL && DocLexer::T_EQUALS === $peek['type']) { return $this->FieldAssignment(); } diff -u b/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php --- b/core/lib/Drupal/Core/Render/Element.php +++ b/core/lib/Drupal/Core/Render/Element.php @@ -78,7 +78,7 @@ $i = 0; $sortable = FALSE; foreach ($elements as $key => $value) { - if (is_integer($key) || $key === '' || $key[0] !== '#') { + if (is_int($key) || $key === '' || $key[0] !== '#') { if (is_array($value)) { if (isset($value['#weight'])) { $weight = $value['#weight']; diff -u b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php --- b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php +++ b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php @@ -185,12 +185,12 @@ $values += [ 'options' => [], ]; - } - // Unserialize the values, this is deprecated as the storage takes care of - // this, options must not be passed as a string anymore. - if (isset($values['options']) && is_string($values['options'])) { - @trigger_error('Support for passing options as a serialized string is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Pass them as an array instead. See https://www.drupal.org/node/2961643.', E_USER_DEPRECATED); - $values['options'] = unserialize($values['options'], ['allowed_classes' => FALSE]); + // Unserialize the values, this is deprecated as the storage takes care of + // this, options must not be passed as a string anymore. + if (is_string($values['options'])) { + @trigger_error('Support for passing options as a serialized string is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Pass them as an array instead. See https://www.drupal.org/node/2961643.', E_USER_DEPRECATED); + $values['options'] = unserialize($values['options'], ['allowed_classes' => FALSE]); + } } parent::setValue($values, $notify); } diff -u b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php --- b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php @@ -152,7 +152,7 @@ // Calculate the filename of the JS including the translations. $js_translation_files = \Drupal::state()->get('locale.translation.javascript'); - $js_filename = $prefix . '_' . ($js_translation_files[$prefix] ?? NULL) . '.js'; + $js_filename = $prefix . '_' . ($js_translation_files[$prefix] ?? '') . '.js'; $content = $this->getSession()->getPage()->getContent(); // Assert translations JS is included before drupal.js. diff -u b/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php --- b/core/modules/views/src/Plugin/views/display/PathPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php @@ -101,7 +101,7 @@ protected function isDefaultTabPath() { $menu = $this->getOption('menu'); $tab_options = $this->getOption('tab_options'); - return !empty($menu) && $menu['type'] == 'default tab' && !empty($tab_options['type']) && $tab_options['type'] != 'none'; + return $menu && $menu['type'] == 'default tab' && !empty($tab_options['type']) && $tab_options['type'] != 'none'; } /** reverted: --- b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php +++ a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php @@ -664,7 +664,7 @@ $controller = $this->entityTypeManager->getViewBuilder($entity_type); $build = $controller->view($entity); $renderer->renderRoot($build); + $this->assertEqual($build['label']['#markup'], $values[$current_langcode]['name'], 'By default the entity is rendered in the current language.'); - $this->assertEqual($build['label']['#markup'] ?? NULL, $values[$current_langcode]['name'], 'By default the entity is rendered in the current language.'); $langcodes = array_combine($this->langcodes, $this->langcodes); // We have no translation for the $langcode2 language, hence the expected reverted: --- b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php +++ a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php @@ -194,7 +194,7 @@ $renderer->renderRoot($view); // Check that the weight is respected. + $this->assertEqual($view['label']['#weight'], 20, 'The weight of a display component is respected.'); - $this->assertEqual($view['label']['#weight'] ?? NULL, 20, 'The weight of a display component is respected.'); } /** only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/StorageComparer.php +++ b/core/lib/Drupal/Core/Config/StorageComparer.php @@ -388,7 +388,7 @@ public function hasChanges() { public function validateSiteUuid() { $source = $this->sourceStorage->read('system.site'); $target = $this->targetStorage->read('system.site'); - return $source['uuid'] === $target['uuid']; + return $source && $target && $source['uuid'] === $target['uuid']; } /** only in patch2: unchanged: --- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php +++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php @@ -363,7 +363,7 @@ public function findChroot() { $parts = explode('/', $path); $chroot = ''; while (count($parts)) { - $check = implode($parts, '/'); + $check = implode('/', $parts); if ($this->isFile($check . '/' . \Drupal::service('file_system')->basename(__FILE__))) { // Remove the trailing slash. return substr($chroot, 0, -1); only in patch2: unchanged: --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php @@ -136,6 +136,9 @@ protected function setUp() { $this->executable = $this->getMockBuilder('Drupal\views\ViewExecutable') ->disableOriginalConstructor() ->getMock(); + $this->executable->style_plugin = $this->getMockBuilder('Drupal\views\Plugin\views\style\StylePluginBase') + ->disableOriginalConstructor() + ->getMock(); $this->display = $this->getMockBuilder('Drupal\views\Plugin\views\display\DisplayPluginBase') ->disableOriginalConstructor() ->getMock();