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

Change syntax for get services by tag to #tag-name #311

Open
vjik opened this issue Nov 5, 2022 · 6 comments
Open

Change syntax for get services by tag to #tag-name #311

vjik opened this issue Nov 5, 2022 · 6 comments

Comments

@vjik
Copy link
Member

vjik commented Nov 5, 2022

Replace $container->get('tag@car'); to $container->get('#car');.

It will be more shortly and familiar.

@xepozz
Copy link
Member

xepozz commented Nov 5, 2022

The original form was made for extending purposes. For example, the package may support any other custom things and simpler to use new short word with @ instead of thinking about another char because @ already means tags.

@rustamwin
Copy link
Member

The original form was made for extending purposes. For example, the package may support any other custom things and simpler to use new short word with @ instead of thinking about another char because @ already means tags.

Dou you mean #?

@xepozz
Copy link
Member

xepozz commented Nov 5, 2022

I mean tag@ is ok to be able to add some new shortcuts like decorator@ or something else. This form allows you just add new word instead of add more and more characters.

@vjik
Copy link
Member Author

vjik commented Nov 6, 2022

Hm. How can work $container->get('decorator@XXX');?
Has ideas anything keywords for use in get() ?

@samdark
Copy link
Member

samdark commented Nov 6, 2022

We can probably support both.

@xepozz
Copy link
Member

xepozz commented Nov 6, 2022

Hm. How can work $container->get('decorator@XXX');?

It doesn't matter how it can work. That's a showcase.

Has ideas anything keywords for use in get() ?

Sorry, I don't understand you.

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

No branches or pull requests

4 participants