Skip to content

Service manager v4 #149

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

Draft
wants to merge 2 commits into
base: 3.0.x
Choose a base branch
from
Draft

Conversation

ramchale
Copy link
Contributor

@ramchale ramchale commented Aug 7, 2025

This still needs a lot of tidy up, but seems fairly close to a working version with service-manager v4.

Raised as a draft to check if there's anything else obvious I'm missing, and seek some help fixing the remaining tests.

(The block of commented out code in Factory being an obvious area that needs a look)

@ramchale ramchale force-pushed the service-manager-v4 branch from e8b0ea4 to a2ec234 Compare August 7, 2025 13:53
@gsteel
Copy link
Member

gsteel commented Aug 7, 2025

Just playing around locally with this patch - and validator ^3.6 will defo be needed so that we can $validators->build(ValidatorChain::class, $spec).

I think we might need to do some more cleanup before we can figure out what's tripping up those tests… 🤔

@ramchale ramchale force-pushed the service-manager-v4 branch 2 times, most recently from 5fe6d8b to 2a0faa4 Compare August 8, 2025 09:40
@ramchale
Copy link
Contributor Author

ramchale commented Aug 8, 2025

Thanks for the work on resolve the underlying changes @gsteel

I've just done a quick rebase and fixed a few obvious bits. Busy day ahead, so I'll get back to this when I can. Happy for anyone else to make progress with it in the meantime if they'd like to

@gsteel
Copy link
Member

gsteel commented Aug 8, 2025

Cheers @ramchale 👍

Signed-off-by: ramchale <[email protected]>
@ramchale ramchale force-pushed the service-manager-v4 branch from dfc42b3 to 840f6de Compare August 9, 2025 15:29
self::assertSame($validator, $validatorPluginManager->get('foo_validator'));
// End

$inputFilter = $this->factory->__invoke($services, 'filter');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fails with "ServiceNotFoundException: Unable to resolve service "foo_validator" to a factory"

Debugging thorugh, it looks like the filter also can't be resolved but does not throw an Exception.
The build methods of the filterPluginManager and validatorPluginManager don't seem like they try to use the 'services', so I'm not sure this can pass unless we want to make further changes to those.

Worth double checking though, as I'm much less familiar with the internals of the plugin managers than some other parts of the code

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.

2 participants