Skip to content

[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

Merged
merged 1 commit into from
Feb 12, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh 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

@xabbuh xabbuh added the Yaml label Feb 9, 2016
@xabbuh xabbuh force-pushed the yaml-dumper-exception-flag branch from e450453 to 5c58bc6 Compare February 9, 2016 20:31
@xabbuh xabbuh force-pushed the yaml-dumper-exception-flag branch 2 times, most recently from b5a9312 to a029822 Compare February 9, 2016 20:44
@xabbuh xabbuh changed the title [Yaml] dumper flag for enabling exception on invalid type [Yaml] dumper flag for enabling exceptions on invalid type Feb 9, 2016
@xabbuh xabbuh force-pushed the yaml-dumper-exception-flag branch from a029822 to e572a64 Compare February 9, 2016 20:52
@fabpot
Copy link
Member

fabpot commented Feb 12, 2016

👍

@@ -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;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

see #17780

@fabpot
Copy link
Member

fabpot commented Feb 12, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit e572a64 into symfony:master Feb 12, 2016
fabpot added a commit that referenced this pull request Feb 12, 2016
…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
@xabbuh xabbuh deleted the yaml-dumper-exception-flag branch February 12, 2016 16:27
fabpot added a commit that referenced this pull request Feb 14, 2016
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
@xabbuh xabbuh mentioned this pull request Mar 1, 2016
7 tasks
@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.

4 participants