Commit 8b43964
committed
minor symfony#60025 [Serializer] Fix code skipped by premature return (HypeMC)
This PR was merged into the 6.4 branch.
Discussion
----------
[Serializer] Fix code skipped by premature return
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
The problem with the current code is the early return:
https://github.com/symfony/symfony/blob/c9ed7620fb00e8e7db89fe724cabd0bd43cec0dc/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L2007-L2009
Some code after the return is not related to the object normalizer, and should therefor not be skipped:
https://github.com/symfony/symfony/blob/c9ed7620fb00e8e7db89fe724cabd0bd43cec0dc/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L2025-L2026
This PR replaces the early return by wrapping the code related to the object normalizer inside the `if` block to prevent any future mistakes.
Probably easier to review with [whitespace changes hidden](https://github.com/symfony/symfony/pull/60025/files?diff=unified&w=1).
Commits
-------
1aec1b3 [Serializer] Fix code skipped by premature returnFile tree
1 file changed
+11
-13
lines changed- src/Symfony/Bundle/FrameworkBundle/DependencyInjection
1 file changed
+11
-13
lines changedLines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2004 | 2004 | | |
2005 | 2005 | | |
2006 | 2006 | | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
2010 | 2010 | | |
2011 | | - | |
2012 | | - | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
2013 | 2015 | | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
2018 | 2019 | | |
2019 | | - | |
2020 | | - | |
| 2020 | + | |
2021 | 2021 | | |
2022 | 2022 | | |
2023 | | - | |
2024 | | - | |
2025 | 2023 | | |
2026 | 2024 | | |
2027 | 2025 | | |
| |||
0 commit comments