- 🇺🇸United States smustgrave
Is this something that will require a test case?
- 🇦🇺Australia mstrelan
I'm not sure if there's a performance cost, but even if there isn't, it's clearer if the code just gets the one theme it wants.
There is no performance cost, because
ThemeHandler::getTheme
does the exact same thing. But I agree it would be clearer.The latest patch is catching an
InvalidArgumentException
but that changed to\Drupal\Core\Extension\Exception\UnknownExtensionException
in #2940203: Use dedicated Exception classes for extension system → . FWIW I'm not sure we should really be catching the exception, or if we are we should do something more useful than just returning an empty array. Otherwise you never really find out that something is broken.Needs to be converted to an MR against 11.x.
Is this something that will require a test case?
Wouldn't have thought so, it should already be tested somewhere, we're just changing the implementation details.
- First commit to issue fork.
- Merge request !12588system_region_list() could use getTheme() instead of listInfo(). → (Open) created by mrinalini9
- 🇦🇺Australia mstrelan
Let's catch \Drupal\Core\Extension\Exception\UnknownExtensionException instead
use \Drupal\Core\Extension\Exception\UnknownExtensionException instead of \InvalidArgumentException.
please review.