- π©πͺGermany donquixote
74dbb97f - Remove support for autoconfigure and bind for now.
Do we have a follow-up issue to re-add the "bind"?
I think it would be quite useful to have :)
Symfony allows you to specify _defaults key in your services.yml file. This allows you to specify defaults for all of your services. See https://symfony.com/doc/current/service_container.html
In Symfony it often looks like
# config/services.yaml
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
public: false # Allows optimizing the container by removing unused services; this also means
# fetching services directly from the container via $container->get() won't work.
# The best practice is to be explicit about your dependencies anyway.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{Entity,Migrations,Tests,Kernel.php}'
# ...
Whilst autoconfigure
is not relevant yet it would be nice for a module to be able to declare all of its services as public: false
(if for example it wants to prevent the service locator pattern - yes this is hard is Drupal because plugin managers and events don't work with them but maybe in the future) and autowire
will be supported by
#3021803: Document and add tests for service autowiring β
.
Implement this by copying code from YamlFileLoader once #3021803: Document and add tests for service autowiring β has landed.
None
@todo
None
@todo
Fixed
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
74dbb97f - Remove support for autoconfigure and bind for now.
Do we have a follow-up issue to re-add the "bind"?
I think it would be quite useful to have :)