lhapaipai / vite-bundle

Integration with your Symfony app & Vite

Home Page:https://symfony-vite.pentatrion.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Pentatrion\ViteBundle\Service\EntrypointRenderer` does not implement `Symfony\Contracts\Service\ResetInterface`

FluffyDiscord opened this issue · comments

commented

vite-bundle version

v6.3.2

vite-plugin-symfony version

6.3.2

your OS, Symfony version, PHP version, Node version

No response

Description

Currently I am unable to run my Symfony in worker mode using RoadRunner because after the first request EntrypointRenderer fills up it's $renderedFiles array and following requests skip rendering the entrypoints. because the array is not cleared. EntrypointRenderer already has ->reset() function, but it seems that you have forgotten to register the class to be resetable by implementing the ResetInterface, so it's currently not working.

How to reproduce

Not relevant

Possible Solution

No response

hi @FluffyDiscord, I implemented the reset() method for another need.
I had seen that ResetInterface and its tag kernel.reset existed but I didn't understand what it was for... thank you, I now understand!

I tested with FrankenPHP (worker mode) and added a new playground : https://github.com/lhapaipai/symfony-vite-dev/tree/main/playground/worker-mode .
Can you confirm that everything is ok with RoadRunner?

commented

Can confirm its fixed with dev-master

great !
ps : you don't have to stay on a development branch, the patch was applied in version 6.3.3