phpstan-drupal icon indicating copy to clipboard operation
phpstan-drupal copied to clipboard

Split apart RenderCallbackRule

Open mglaman opened this issue 2 years ago • 0 comments

Feature request

This will trigger the 1.2.0 release.

RenderCallbackRule inspects render array callables. It should be split apart for:

  • AccessCallbackRule for #access_callback
  • LazyBuilderCallbackRule for #lazy_builder
  • RenderCallbackRule is for the remaining items, which all support an array of callables

We need to extract the trusted callback checks into its service. These rules can call this service to include that as an error on top of other possible errors. PHPStan has a similar setup for some of its rules.

mglaman avatar May 12 '23 13:05 mglaman