Unverified Commit 11ddd4c0 authored by larowlan's avatar larowlan

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

(cherry picked from commit d22493e7)
parent a68dcb9b
...@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment