Skip to content
Snippets Groups Projects
Verified Commit d22493e7 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #2904467 by quietone, andyg5000: Plugins do not preserve integer keys...

Issue #2904467 by quietone, andyg5000: Plugins do not preserve integer keys when parsing annotations
parent c04b62d6
No related branches found
No related tags found
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
...@@ -39,7 +39,7 @@ public function __construct($values) { ...@@ -39,7 +39,7 @@ public function __construct($values) {
return $value !== NULL; return $value !== NULL;
}); });
$parsed_values = $this->parse($values); $parsed_values = $this->parse($values);
$this->definition = NestedArray::mergeDeep($defaults, $parsed_values); $this->definition = NestedArray::mergeDeepArray([$defaults, $parsed_values], TRUE);
} }
/** /**
......
...@@ -20,6 +20,7 @@ public function testGet() { ...@@ -20,6 +20,7 @@ public function testGet() {
// Assert all values are accepted through constructor and default value is // Assert all values are accepted through constructor and default value is
// used for non existent but defined property. // used for non existent but defined property.
$plugin = new PluginStub([ $plugin = new PluginStub([
1 => 'oak',
'foo' => 'bar', 'foo' => 'bar',
'biz' => [ 'biz' => [
'baz' => 'boom', 'baz' => 'boom',
...@@ -32,6 +33,7 @@ public function testGet() { ...@@ -32,6 +33,7 @@ public function testGet() {
// This property wasn't in our definition but is defined as a property on // This property wasn't in our definition but is defined as a property on
// our plugin class. // our plugin class.
'defaultProperty' => 'testvalue', 'defaultProperty' => 'testvalue',
1 => 'oak',
'foo' => 'bar', 'foo' => 'bar',
'biz' => [ 'biz' => [
'baz' => 'boom', 'baz' => 'boom',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment