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

Sanity check service data in legacy service instantiator #5629

Merged
merged 6 commits into from Jun 7, 2023

Conversation

greg-1-anderson
Copy link
Member

Validate that service data looks reasonable before instantiating any services. Skip any service file that we do not have confidence in.

…services. Skip any service file that we do not have confidence in.
src/Runtime/LegacyServiceInstantiator.php Outdated Show resolved Hide resolved
src/Runtime/LegacyServiceInstantiator.php Outdated Show resolved Hide resolved
src/Runtime/LegacyServiceInstantiator.php Outdated Show resolved Hide resolved
Co-authored-by: Moshe Weitzman <weitzman@tejasa.com>

// We don't support auto-wiring
if (!empty($serviceFileData['services']['_defaults']['autowire'])) {
$this->logger->warning(dt('Autowire not supported; skipping @file', ['@file' => $serviceFile]));
Copy link
Member

Choose a reason for hiding this comment

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

I think we should downgrade these to info(). They are typically going to be from commandfiles that you dont care about. Its not like user is trying to run a command in the file.

@weitzman weitzman merged commit bbd54a6 into 12.x Jun 7, 2023
2 checks passed
@weitzman weitzman deleted the sanity-check-legacy-services branch June 7, 2023 13:06
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.

None yet

2 participants