- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
An alternative approach here would just be to call this on the $new_element
if (isset($elements['#type'])) { $element += $this->elementInfo->getInfo($elements['#type']) }
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
It's roughly 10 lines below where the renderer already calls it (off the top of my head when I hit this issue yesterday)
- Assigned to kristiaanvandeneynde
- Merge request !11250Load defaults for lazy builders, needs tests and we need to look at pre_render (and post_render)? β (Open) created by kristiaanvandeneynde
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Needs tests and we need to update https://www.drupal.org/docs/drupal-apis/render-api/auto-placeholdering#s... β
Also we should check if we want to load defaults for pre_render and post_render. But there we need to also check if defaults were already loaded and someone changed the type.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Why is phpstan choking on this on an unrelated variable that it should know how to inspect.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Meh added it to the baseline. The alternative was asinine:
if ($this->rendererConfig['debug'] === TRUE) { $render_start = microtime(TRUE); } // Had to become (also further down): $debug_mode = $this->rendererConfig['debug']; if ($debug_mode) { $render_start = microtime(TRUE); }
To hell with that :)
- πΊπΈUnited States smustgrave
Wonder if the IS could get some love. Using the standard template please
Good to see the tests still pass but believe will still need test coverage
Thanks.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Will try to find time next week to test this. If someone wants to have a crack at this in the meantime, go ahead.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
All green and the "test-only changes" job shows the failure we want to see.
- π¨π¦Canada joelpittet Vancouver
That looks great, thanks for the red/green tests. I scoured over the code and didnβt spot anything concerning.