File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,21 @@ public function fileData(): \Generator
108
108
__DIR__ . '/../../fixtures/drupal/core/lib/Drupal/Core/Render/Renderer.php ' ,
109
109
[]
110
110
];
111
+ yield [
112
+ __DIR__ . '/data/bug-424.php ' ,
113
+ [
114
+ [
115
+ "#lazy_builder value 'non-empty-string' at key '0' is invalid. " ,
116
+ 10 ,
117
+ "Refactor concatenation of `static::class` with method name to an array callback: [static::class, 'contentLazyBuilder'] "
118
+ ],
119
+ [
120
+ "#lazy_builder callback class 'static(Bug424\Foo)' at key '0' does not implement Drupal\Core\Security\TrustedCallbackInterface. " ,
121
+ 17 ,
122
+ "Change record: https://www.drupal.org/node/2966725. "
123
+ ]
124
+ ]
125
+ ];
111
126
}
112
127
113
128
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Bug424 ;
4
+
5
+ class Foo {
6
+ public function render (): array {
7
+ $ build = [
8
+ 'one ' => [
9
+ '#lazy_builder ' => [
10
+ static ::class . '::contentLazyBuilder ' ,
11
+ ['foo ' ],
12
+ ],
13
+ '#create_placeholder ' => TRUE ,
14
+ ],
15
+ 'two ' => [
16
+ '#lazy_builder ' => [
17
+ [static ::class, 'contentLazyBuilder ' ],
18
+ ['foo ' ],
19
+ ],
20
+ '#create_placeholder ' => TRUE ,
21
+ ]
22
+ ];
23
+
24
+ return $ build ;
25
+ }
26
+
27
+ public static function contentLazyBuilder (string $ foo ): void {
28
+
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments