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 support for shorthand service definition syntax #817

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Niklan
Copy link
Contributor

@Niklan Niklan commented Jan 15, 2025

Closes #816

@Niklan Niklan marked this pull request as draft January 16, 2025 03:34
@Niklan
Copy link
Contributor Author

Niklan commented Jan 16, 2025

I thought about it, and this is a wrong solution. If a shorthand service definition like Drupal\foo\Bar: {} is used, we should check the service ID with class_exists(). If it's true, then we should set it in the definition, and the current code will handle it properly. Because currently, such services do not have a class property value.

Converting the MR to a draft to prevent it from being merged. I will improve it later.

@Niklan Niklan changed the title Allow interfaces to also be used as a 'class' in service definitions Add support for shorthand service definition syntax Jan 16, 2025
@Niklan Niklan marked this pull request as ready for review January 16, 2025 14:30
@mglaman mglaman merged commit d30fbd7 into mglaman:main Jan 17, 2025
15 checks passed
@mglaman
Copy link
Owner

mglaman commented Jan 17, 2025

Thanks!

mglaman pushed a commit that referenced this pull request Jan 23, 2025
* Allow interfaces to also be used as a 'class' in service definitions

* Handle shorthand syntax for service definition
mglaman added a commit that referenced this pull request Jan 23, 2025
Add support for shorthand service definition syntax (#817)

* Allow interfaces to also be used as a 'class' in service definitions

* Handle shorthand syntax for service definition

Co-authored-by: Nikita Malyshev <[email protected]>
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.

Add support for shorthand service definition syntax
2 participants