Limenius / ReactRenderer

Client and Server-side React rendering from PHP
MIT License
238 stars 37 forks source link

AbstractReactRenderer is not guaranteed to exist #28

Closed rakelley closed 5 years ago

rakelley commented 5 years ago

This is regression from #20 . \Limenius\ReactRenderer\Twig\ReactRenderExtension::__construct() blindly calls \Limenius\ReactRenderer\Renderer\StaticReactRenderer::setRenderer() without checking if the renderer is null. This is an intentionally nullable argument and in certain configurations (e.g. using the bundle with default_rendering: "client_side") will not exist.

IkeLutra commented 5 years ago

I came across this as well. I will try and take a look at this and see if I can come up with a PR

nacmartin commented 5 years ago

Related: https://github.com/Limenius/ReactRenderer/issues/27

Yes, adding the static renderer in the presented form was a mistake. Trying to fix it in a new release.

aesislabs commented 5 years ago

Is there any workaround to this ?

IkeLutra commented 5 years ago

@aesislabs My workaround was to pin to v2.1.0 which works

VincentLanglet commented 5 years ago

Still no update on this issue ?

nacmartin commented 5 years ago

Fixed in v4.