Limenius / ReactBundle

Client and Server-side React.js rendering in a Symfony Bundle
MIT License
390 stars 53 forks source link

v2.3.1 use ReactRendered 3.0 but wire wrong renderer #37

Closed Mrlaminat closed 4 years ago

Mrlaminat commented 5 years ago

In the file Resources/config/services.xml:

        <parameter key="limenius_react.context_provider.class">Limenius\ReactRenderer\Context\SymfonyContextProvider</parameter>

        <parameter key="limenius_react.static_react_renderer.class">Limenius\ReactRenderer\Renderer\StaticReactRenderer</parameter>

But in composer.json we require "limenius/react-renderer": "^3.0.0".

Error message:

In ReactRenderExtension.php line 35:

!!                                                                                 
!!    Argument 2 passed to Limenius\ReactRenderer\Twig\ReactRenderExtension::__co  
!!    nstruct() must be an instance of Limenius\ReactRenderer\Renderer\StaticReac  
!!    tRenderer, instance of Limenius\ReactRenderer\Context\SymfonyContextProvide  
!!    r given
IkeLutra commented 5 years ago

This is due to the dependency injection definitions not having been updated. See https://github.com/Limenius/ReactBundle/blob/master/Resources/config/twig.xml#L12

I will try and submit a PR but that class now requires the AbstractRenderer exists as the static one is dependent on it.

My solution was to pin react-bundle to v2.1.0 which is the last working version as it depends on react-renderer v2.

myspulin commented 5 years ago

Hi, I have the same issue, is there any update? Thanks for info.

Mrlaminat commented 5 years ago

Hi, I have the same issue, is there any update? Thanks for info.

I think no, you can just fix version to stable one.

AlexandreKilian commented 5 years ago

just experienced it too, reactrenderer should be locked to ^2.1 in reactbundle

VincentLanglet commented 5 years ago

@nacmartin Do you plan to fix it ?

nacmartin commented 4 years ago

I am working on this now.

nacmartin commented 4 years ago

I have pushed a new version v4 with this fixed, here and in ReactRenderer. Please tell me if there is any issue.