-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] Add StringNode
#58428
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
[Config] Add StringNode
#58428
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.
Works for me
class StringNodeTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider getValidValues |
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.
data providers could be replaced by @testWith
annotation in this class
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.
this would create more work when migrating to PHPUnit 11, so not sure it is worth it.
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.
This will be automated, #[TestWith]
FTW.
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.
This misses the corresponding node builders to make it usable easily.
Hi @stof added StringNodeDefinition. Thank you. |
@raffaelecarelle you should also add support for it in |
2f0bf87
to
eec0d46
Compare
@stof sorry, here we go |
src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
Outdated
Show resolved
Hide resolved
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.
LGTM with minor comments
src/Symfony/Component/Config/Definition/Builder/StringNodeDefinition.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Config/Tests/Definition/StringNodeTest.php
Outdated
Show resolved
Hide resolved
520552b
to
f69bf34
Compare
2c9b18f
to
88b53a0
Compare
Thank you @raffaelecarelle. |
Introduce the
StringNode
class to handle string values within the configuration tree. Added validation for incorrect types and complemented it with unit tests to verify both valid and invalid scenarios.Introduce the
StringNode
class to handle string values within the configuration tree.