Overwriting Symfony 3.3 container services in controller tests Overwriting Symfony 3.3 container services in controller tests symfony symfony

Overwriting Symfony 3.3 container services in controller tests


I'm also facing this issue and there's no hint within the Container class on how to handle this deprecation.

// for all interested, there's a current issue open on github - but no real solution other than either have a lot more bootstrapping code for your unit tests or moving to test the controllers in isolation.I'd recommend to have all controllers defined as services with fixed/defined dependiencies and no direct DIC usage.