Skip to content

Conversation

@GuilhemN
Copy link
Contributor

Q A
Branch? "master"
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Was part of #17706.
Change the remaining isset($config['foo']) to $this->isConfigEnabled($config['foo']) to allow to use parameters to enable a feature.

@stof
Copy link
Member

stof commented Jun 23, 2016

The fact that it does not change the Configuration class looks weird to me

@GuilhemN
Copy link
Contributor Author

@stof canBeEnabled is used in the Configuration so it's ok. In fact it's possible that this was broken, i'll run some checks.

@GuilhemN
Copy link
Contributor Author

@stof ok in fact the $this->isConfigEnabled() is inside the register* functions.
Anyway this still looks inconsistent to me, imo we should move this checks to the main function, wdyt?

@xabbuh
Copy link
Member

xabbuh commented Jun 23, 2016

At least, I would now remove the second call to the isConfigEnabled() method inside registerSerializerConfiguration() and registerPropertyInfoConfiguration().

@GuilhemN GuilhemN force-pushed the FRAMEWORKEXTENSION branch from a02ee60 to c30f0b0 Compare June 23, 2016 20:21
@GuilhemN GuilhemN changed the title [FrameworkBundle] Fix small inconsistensies [FrameworkBundle] Fix redundant code Jun 23, 2016
@GuilhemN GuilhemN changed the title [FrameworkBundle] Fix redundant code [FrameworkBundle] Remove redundant code Jun 23, 2016
@GuilhemN GuilhemN force-pushed the FRAMEWORKEXTENSION branch from c30f0b0 to a21af88 Compare June 23, 2016 20:21
@GuilhemN
Copy link
Contributor Author

done @xabbuh

@xabbuh
Copy link
Member

xabbuh commented Jun 23, 2016

👍 LGTM

@fabpot
Copy link
Member

fabpot commented Jun 24, 2016

Thank you @Ener-Getick.

@fabpot fabpot merged commit a21af88 into symfony:master Jun 24, 2016
fabpot added a commit that referenced this pull request Jun 24, 2016
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Remove redundant code

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Was part of #17706.
Change the remaining ``isset($config['foo'])`` to ``$this->isConfigEnabled($config['foo'])`` to allow to use parameters to enable a feature.

Commits
-------

a21af88 [FrameworkBundle] Remove redundant code
@GuilhemN GuilhemN deleted the FRAMEWORKEXTENSION branch June 24, 2016 06:23
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.

5 participants