You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownew \LogicException(sprintf('A "%s" prop was passed when creating the component. No matching "%s" property or mount() argument was found, so we attempted to use this as an HTML attribute. But, the value is not a scalar (it\'s a %s). Did you mean to pass this to your component or is there a typo on its name?', $key, $key, get_debug_type($value)));
40
-
}
41
-
42
-
if (null === $value) {
43
-
trigger_deprecation('symfony/ux-twig-component', '2.8.0', 'Passing "null" as an attribute value is deprecated and will throw an exception in 3.0.');
44
-
$value = true;
45
-
}
46
-
47
42
returnmatch ($value) {
48
43
true => "{$carry}{$key}",
49
44
false => $carry,
@@ -59,7 +54,7 @@ function (string $carry, string $key) {
59
54
*/
60
55
publicfunctionall(): array
61
56
{
62
-
return$this->attributes;
57
+
return$this->ensureNormalized()->attributes;
63
58
}
64
59
65
60
/**
@@ -79,6 +74,8 @@ public function defaults(iterable $attributes): self
79
74
$attributes = iterator_to_array($attributes);
80
75
}
81
76
77
+
self::normalize($attributes);
78
+
82
79
foreach ($this->attributesas$key => $value) {
83
80
if (\in_array($key, ['class', 'data-controller', 'data-action'], true) && isset($attributes[$key])) {
thrownew \LogicException(sprintf('A "%s" prop was passed when creating the component. No matching "%s" property or mount() argument was found, so we attempted to use this as an HTML attribute. But, the value is not a scalar (it\'s a %s). Did you mean to pass this to your component or is there a typo on its name?', $key, $key, get_debug_type($value)));
0 commit comments