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
Currently, the watcher rebuilds the whole container (with cache) only in --debug mode. Which is not used by default (for example, in skeleton).
And it leads to weird errors. For example, I have a controller. And I add a dependency to it. The watcher says that it detects the change and reloads the app. But, the container stays the same. The way the controller is built in the container is outdated. And I receive an error like this:
Too few arguments to functionApp\Controller\DefaultController::__construct()
I'm not sure that we need to use debug mode always for development. Because recreating a cache for any change looks like a bit overhead 🙈 @mmoreram do you have any ideas how to solve it? Or maybe I'm misusing the server and doing something wrong?
The text was updated successfully, but these errors were encountered:
Watcher should always work with --debug, so the thing here would be to explicitly tell the watcher command to add the flag when executing the server in the background.
About the overhead, reloading the cache each time is the main practice in Symfony. Is OK. Basically, because all changes in the code might change the cache layer. As far I can remember, the cache layer is only rebuilt when cacheable files (YAML) change.
I wouldn't be worried about performance in this scenario.
Currently, the watcher rebuilds the whole container (with cache) only in
--debug
mode. Which is not used by default (for example, in skeleton).And it leads to weird errors. For example, I have a controller. And I add a dependency to it. The watcher says that it detects the change and reloads the app. But, the container stays the same. The way the controller is built in the container is outdated. And I receive an error like this:
I'm not sure that we need to use
debug
mode always for development. Because recreating a cache for any change looks like a bit overhead 🙈@mmoreram do you have any ideas how to solve it? Or maybe I'm misusing the server and doing something wrong?
The text was updated successfully, but these errors were encountered: