Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aliases for manager services for improved autowiring support #1554

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Jan 3, 2024

Q A
Branch? 2.x
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets N/A
License MIT
Doc N/A

The liip_imagine.cache.manager, liip_imagine.data.manager, and liip_imagine.filter.manager services cannot be autowired at present, requiring folks to either manually create aliases in their app's configuration or to use one of the newer dependency injection attributes to specify the right service in their classes. This PR adds the appropriate service aliases to support autowiring and remove that little bit of extra overhead needed to use these three services.

@coveralls
Copy link

Coverage Status

coverage: 81.998%. remained the same
when pulling 63d9dba on mbabker:autowiring-aliases
into 1d42ed1 on liip:2.x.

Copy link
Member

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

can you please also update the documentation of the corresponding services? i see that filter and data do not mention the service names but cache does, so there we should change it to use the CacheManager FQN as service name.

@dbu dbu merged commit bb4c7f0 into liip:2.x Feb 26, 2024
30 checks passed
@mbabker mbabker deleted the autowiring-aliases branch February 26, 2024 14:50
@mbabker
Copy link
Contributor Author

mbabker commented Feb 26, 2024

can you please also update the documentation of the corresponding services?

Sorry, I forgot all about this ask with the way things have gone for me over the last several weeks. I'll try to throw a PR together for the docs soon.

@dbu
Copy link
Member

dbu commented Feb 26, 2024

no worries. i also forgot and just noticed now. i adjusted the doc in 13be8f6

i want to cleanup rather radically for 3.x, i think no further doc refinement for the 2.x is needed now.

and thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants