Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency #17690

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
wants to merge 2 commits into from

Conversation

GuilhemN
Copy link
Contributor

@GuilhemN GuilhemN commented Feb 4, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #13703
License MIT

I'm not sure if we should consider this as a bug fix or as a new feature.

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

👍

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

To keep BC, I would keep the canBeUnset() call as well.

@GuilhemN
Copy link
Contributor Author

GuilhemN commented Mar 2, 2016

@fabpot in case someone uses the FrameworkBundle's Configuration class and check if keys exist ?
Otherwise canBeEnabled threat false so it should not change anything to the actual configurations.

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

@Ener-Getick I know that the BC break would be small, but as it does not cost us anything to not break BC, I prefer to.

@GuilhemN
Copy link
Contributor Author

GuilhemN commented Mar 2, 2016

@fabpot well having both options wouldn't change the Configuration output.
(allowFalse is checked after equivalentValues, see here).
The only thing changing would be that ArrayNode::setAllowFalse() would be called. Is this what you want ?

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

ok, fair enough, 👍

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

Thank you @Ener-Getick.

@fabpot fabpot closed this in bcf0e91 Mar 2, 2016
@GuilhemN GuilhemN deleted the DOC branch March 2, 2016 13:25
@GuilhemN
Copy link
Contributor Author

GuilhemN commented Mar 2, 2016

You're welcome :-)

And I see one solution to keep canBeUnset but I don't know if that's not durty...

->arrayNode()
    ->canBeEnabled()
    ->canBeUnset()
    ->threatFalseLike(false)

@fabpot fabpot mentioned this pull request May 13, 2016
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.

3 participants