Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 Nov 2025 at 09:57 UTC
Updated:
21 Jul 2026 at 11:00 UTC
Jump to comment: Most recent
Currently, some public services are not easily autowireable because their service IDs do not match their class names or required aliases are missing. This discrepancy makes constructor-based dependency injection less straightforward for module and custom code developers, as autowiring only works when the container can resolve dependencies by class name or alias.
Example
For a service defined as (in acquia_dam.services.yml):
acquia_dam.authentication_service:
class: Drupal\acquia_dam\AcquiadamAuthService
arguments: ['@user.data', '@config.factory', '@http_client', '@state', '@module_handler', '@logger.channel.acquia_dam', '@cache_tags.invalidator', '@logger.channel.acquia_dam', '@?key.repository']
Add an alias:
Drupal\acquia_dam\AcquiadamAuthService: '@acquia_dam.authentication_service'
Benefits
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajeshreeputraComment #4
rajeshreeputraComment #5
rajeshreeputraRequesting review.
Comment #8
rohan-sinha commentedlgtm.
Comment #9
rajeshreeputraThe MR targets the 1.2.x branch; we need it for the 1.1.x branch. Moving it back in needs work.
Comment #11
rajeshreeputraResolved conflicts and rebased the MR!280 that targets 1.1.x branch, closed MR!230.
Requesting review.
Comment #13
rajeshreeputraMR merged!