[General] Use service locators where needed
Since Symfony 5.1 it is deprecated to inject the container using autowiring. We currently do that at some places where we need to dynamically access some service instances based on a common interface.
Example:
Since symfony/dependency-injection 5.1: The "Psr\Container\ContainerInterface" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.
This happens for several classes, but for different reasons.
One specific subset relates to Zikula\BlocksModule\Api\BlockFactoryApi and Zikula\ContentModule\Helper\ContentDisplayHelper. For these defining a service locator will be the better approach, since this avoids injecting the entire container at all.
https://symfony.com/blog/new-in-symfony-3-3-service-locators https://symfony.com/doc/current/service_container/service_subscribers_locators.html#defining-a-service-locator