define Path controller as service and inject only dependencies.
End refactoring Path controller