1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-27 17:28:39 +00:00

Move to controller as a service

Mostly using autowiring to inject deps.
The only tricky part was for import because all producer use the same class and have a different alias. So we must write them down in the service definition, autowiring doesn't work in that case.

Usually:
- if a controller has a constructor, it means injected services are at least re-used once in actions
- otherwise, service are injected per action
This commit is contained in:
Jeremy Benoist 2022-12-19 10:37:22 +01:00
parent 39f603e015
commit 6aca334d53
No known key found for this signature in database
GPG key ID: 7168D5DD29F38552
36 changed files with 855 additions and 699 deletions

View file

@ -12,7 +12,7 @@ class StaticController extends Controller
*/
public function howtoAction()
{
$addonsUrl = $this->container->getParameter('addons_url');
$addonsUrl = $this->getParameter('addons_url');
return $this->render(
'@WallabagCore/Static/howto.html.twig',