You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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.
The text was updated successfully, but these errors were encountered: