-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] Introduce BuilderAwareInterface #26308
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
Conversation
namespace Symfony\Component\Config\Definition\Builder; | ||
|
||
/** | ||
* An interface that can be implemented by nodes which built other nodes. |
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.
s/built/build
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.
with minor comment
interface BuilderAwareInterface | ||
{ | ||
/** | ||
* Sets a custom children builder. |
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.
is this really needed :p ?
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.
It can be just comment, and not phpdoc IMHO.
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.
I only moved things around, https://github.com/symfony/symfony/pull/26335/files#diff-b579be54110e0018ae82a55725bc373fL49
works for me as is :)
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.
We use phpdoc for documenting methods, not wild comments. So it's either a docblock or nothing at all, personally I would remove it as it does not bring much IMHO.
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.
with a really minor comment ^^.
Thank you @ro0NL. |
This PR was squashed before being merged into the 4.1-dev branch (closes #26308). Discussion ---------- [Config] Introduce BuilderAwareInterface | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Split `ParentNodeDefinitionInterface` into `BuilderAwareInterface`. Use case is custom node definition (extended from VariableNodeDef) with a corresponding prototyped array node. To set the actual prototype i need the builder at definition level, provided by `ParentNodeDefinitionInterface`. However i don't implement `children()` + `append()`, i solely need the builder scope. To go after #26297 Commits ------- 1353694 [Config] Introduce BuilderAwareInterface
Split
ParentNodeDefinitionInterface
intoBuilderAwareInterface
.Use case is custom node definition (extended from VariableNodeDef) with a corresponding prototyped array node.
To set the actual prototype i need the builder at definition level, provided by
ParentNodeDefinitionInterface
. However i don't implementchildren()
+append()
, i solely need the builder scope.To go after #26297