Description
I am using Pattern Lab Node v6.0.1
on Ubuntu Linux
, with Node v18.14.0
and using the twig-php pattern engine.
I'm having trouble adding a custom Twig extension via alter-twig.php
. Essentially after adding my extension and running yarn start
it keep breaking into this error:
PHP TwigRenderer Error: The response callback is expected to resolve with an object implementing Psr\Http\Message\ResponseInterface, but rejected with "Error" instead
Not sure if I'm missing something else around my setup to add this extension to the Twig environment, or if this is an actual bug. Docs haven't helped much.
I'm adding screenshots for greater visual reference of my current setup and dependencies.
Expected Behavior
Register Twig custom extension and start Pattern Lab as expected without breaking into TwigRenderer errors.
Actual Behavior
After adding the extension in alter-twig.php
and running yarn start
to let Pattern Lab build and start the server, it keep breaking into this PHP TwigRenderer Error.