-
Couldn't load subscription status.
- Fork 544
Validate checkedExceptionClasses config #3987
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
Validate checkedExceptionClasses config #3987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the preferred way of config validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want that behind featureFlag / bleedingEdge? I think this will be pretty rare.
- Moved validation from DefaultExceptionTypeResolver constructor to ContainerFactory::validateParameters() - Added bleeding edge feature flag protection to avoid BC break - Use InvalidConfigurationException for proper error handling - Note: The required placement in validateParameters() complicates the code as we cannot use BleedingEdgeToggle::isBleedingEdge() since it's not initialized yet, requiring manual parameter checking 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And fix the conflicts please 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put these conditions right next to:
$container = $configurator->createContainer()->getByType(Container::class);
$this->validateParameters($container->getParameters(), $projectConfig['parametersSchema']);
And pass ReflectionProvider properly from $container instead of obtaining it statically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meaning do not call validateExceptionClasses from inside validateParameters, but instead from create.
No description provided.