Problem/Motivation
In Drupal\Core\Template\Loader\FilesystemLoader constructor, $paths parameter has an empty array default value but next parameter ModuleHandlerInterface $module_handler is required.
public function __construct($paths = array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
// ...
}
As $module_handler is required, $paths is always setted, even with empty array.
Proposed resolution
As $module_handler is required, default value can safely be removed.
public function __construct($paths, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
// ...
}
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | filesystemloader_use-2800017-2.patch | 1.2 KB | goz |
Comments
Comment #2
goz commentedComment #3
goz commentedComment #16
smustgrave commentedTook me a while but found where this was fixed.
https://www.drupal.org/project/drupal/issues/2901790
Will move over credit.
Comment #17
quietone commented