-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Steps to reproduce the issue
If you use the BladeRenderer without injecting a factory then you get error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Illuminate\View\Compilers\Compiler::__construct()
Seems BladeCompiler extends Compiler that requires both $filesystem and a $cachePath as parameters.
Sample code:
use Joomla\Renderer\BladeRenderer;
use Joomla\View\HtmlView;
$renderer = new BladeRenderer();
$renderer->addFolder(dirname(__FILE__, 2 ) . '/View');
$view = new HtmlView($renderer);
$view->setLayout('main');
echo $view->render();
Expected result
The Factory dependency for BladeRenderer is not required so should be able to work with default parameters.
Actual result
Throws Fatal Error when used with default parameters.
System information (as much as possible)
Linux ubuntu-desktop 5.4.0-89-generi
PHP 8.0.12
Additional comments
To use this renderer one must inject a factory properly configured with a cache path.
Metadata
Metadata
Assignees
Labels
No labels