Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Service Tagging Capability #28

Merged
merged 19 commits into from
Apr 27, 2024
Merged

Add Service Tagging Capability #28

merged 19 commits into from
Apr 27, 2024

Conversation

XedinUnknown
Copy link
Member

@XedinUnknown XedinUnknown commented Nov 7, 2023

Now you can tag your services, like so:

[
    'serviceA' =>
        /** @tag letters */
        fn (): string => 'A',
    'serviceB' =>
        /**
         * @tag letters
         */
        function (): string {
            return 'B';
        },
    'serviceC' => function (ContainerInterface $c): string {
        var_dump($c->get('letters'));
    },
];

For every unique tag, an extension is added that resolves tagged services and adds them to the list. The list is ensured by also creating an empty list factory with the same name.

@XedinUnknown XedinUnknown added the enhancement New feature or request label Nov 7, 2023
@XedinUnknown XedinUnknown requested a review from mecha November 7, 2023 02:13
@XedinUnknown XedinUnknown self-assigned this Nov 7, 2023
XedinUnknown and others added 2 commits November 9, 2023 12:14
Co-authored-by: Miguel Muscat <miguelmuscat93@gmail.com>
@XedinUnknown
Copy link
Member Author

Looking good!

@Biont has also had a look at this, and I have received positive feedback.

Thanks, all!

@XedinUnknown XedinUnknown merged commit 1568cb2 into 0.2.x Apr 27, 2024
5 checks passed
@XedinUnknown XedinUnknown deleted the feature/service-tagging branch April 27, 2024 01:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants