Skip to content

[Serializer] YamlEncoder: throw if the Yaml component isn't installed #24565

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

dunglas
Copy link
Member

@dunglas dunglas commented Oct 15, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #...
License MIT
Doc PR n/a

Similar to #24563 but for the Yaml encoder (not the same branch).

@@ -29,6 +30,10 @@ class YamlEncoder implements EncoderInterface, DecoderInterface

public function __construct(Dumper $dumper = null, Parser $parser = null, array $defaultContext = array())
{
if (!class_exists(Dumper::class)) {
throw new RuntimeException('Unable to use YamlEncoder as the Symfony Yaml component is not installed.');
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add the package name here too as suggested in #24563.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@fabpot
Copy link
Member

fabpot commented Oct 16, 2017

Thank you @dunglas.

fabpot added a commit that referenced this pull request Oct 16, 2017
…t installed (dunglas)

This PR was squashed before being merged into the 3.3 branch (closes #24565).

Discussion
----------

[Serializer] YamlEncoder: throw if the Yaml component isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Similar to #24563 but for the Yaml encoder (not the same branch).

Commits
-------

7d21caf [Serializer] YamlEncoder: throw if the Yaml component isn't installed
@fabpot fabpot closed this Oct 16, 2017
@dunglas dunglas deleted the yaml_ex branch October 16, 2017 22:36
This was referenced Oct 30, 2017
@fabpot fabpot mentioned this pull request Nov 10, 2017
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.

7 participants