-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] dumper flag for enabling exceptions on invalid type #17743
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
xabbuh
commented
Feb 9, 2016
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR | symfony/symfony-docs#6226 |
e450453
to
5c58bc6
Compare
b5a9312
to
a029822
Compare
a029822
to
e572a64
Compare
👍 |
@@ -39,9 +40,16 @@ public function encode($input, $inline = 0, $dumpObjects = 0) | |||
$dumper = new YamlDumper(); | |||
} | |||
|
|||
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT') && is_bool($dumpObjects)) { | |||
@trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); | |||
$dumpObjects = (int) $dumpObjects; |
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.
As we appplied this change in 2.x branches too (to avoid deprecation warnings when using highest deps), this should be changed there too.
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.
Yes, I'll create a separate pull request when this one is merged.
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.
see #17780
Thank you @xabbuh. |
…type (xabbuh) This PR was merged into the 3.1-dev branch. Discussion ---------- [Yaml] dumper flag for enabling exceptions on invalid type | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- e572a64 dumper flag to enable exceptions on invalid types
This PR was merged into the 2.3 branch. Discussion ---------- [TwigBridge] Symfony 3.1 forward compatibility | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17743 (comment) | License | MIT | Doc PR | Commits ------- 2991639 [TwigBridge] Symfony 3.1 forward compatibility