8000 [FrameworkBundle] Remove unused node definition by alexandre-daubois · Pull Request #59628 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Remove unused node definition #59628

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

Closed

Conversation

alexandre-daubois
Copy link
Member
@alexandre-daubois alexandre-daubois commented Jan 27, 2025
Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

canBeDisabled() is called, thus adding the enabled node adds nothing but unused code in this huge class. May be superseded by #59630.

@GromNaN
Copy link
Member
GromNaN commented Jan 27, 2025

canBeDisabled was discussed when this configuration was added; but they seem to have forgotten to remove the explicit definition of the “enabled” field. https://github.com/symfony/symfony/pull/31060/files#r281128058

@@ -1056,10 +1056,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
->arrayNode('not_compromised_password')
->canBeDisabled()
->children()
->booleanNode('enabled')
->defaultTrue()
->info('When disabled, compromised passwords will be accepted as valid.')
Copy link
Member

Choose a reason for hiding this comment

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

Ne feature proposal: canBeDisabled could accept a parameter for the info.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you're right and I should work on that instead, seems a better option to not loose info, even if it seems self-explanatory in this case.

nicolas-grekas added a commit that referenced this pull request Jan 28, 2025
…finition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()` (alexandre-daubois)

This PR was merged into the 7.3 branch.

Discussion
----------

[FrameworkBundle] Add support for info on `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()`

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | -
| License       | MIT

After #59628 (comment) (cc `@GromNaN`), supersedes #59628 is merged.

Commits
-------

857b778 [FrameworkBundle] Add support for info on `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()`
@alexandre-daubois alexandre-daubois deleted the useless-node branch January 28, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0