Skip to content
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

Unsupported format doesn't throw exception anymore #8

Closed
alex88 opened this issue Dec 13, 2012 · 0 comments
Closed

Unsupported format doesn't throw exception anymore #8

alex88 opened this issue Dec 13, 2012 · 0 comments

Comments

@alex88
Copy link

alex88 commented Dec 13, 2012

Hello,

I'm using the dev-master version of the bundle and now trying to set 'html' as format doesn't throw the usual UnsupportedFormatException but gives "None has no value"

Maybe i've something wrong in the config?

Old serializer.php had

/**
 * @return VisitorInterface
 */
public function getDeserializationVisitor($format)
{
    if (!isset($this->deserializationVisitors[$format])) {
        throw new UnsupportedFormatException(sprintf('Unsupported format "%s".', $format));
    }

    return $this->deserializationVisitors[$format];
}

/**
 * @return VisitorInterface
 */
public function getSerializationVisitor($format)
{
    if (!isset($this->serializationVisitors[$format])) {
        throw new UnsupportedFormatException(sprintf('Unsupported format "%s".', $format));
    }

    return $this->serializationVisitors[$format];
}
alcalyn pushed a commit to alcalyn/serializer that referenced this issue May 5, 2016
Generic way to solve setValue on a property which respects its setter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants