Skip to content

Fix xml-attribute-map for the xml driver #595

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
Aug 3, 2016
Merged

Fix xml-attribute-map for the xml driver #595

merged 1 commit into from
Aug 3, 2016

Conversation

romantomchak
Copy link
Contributor

There is a simple test XML reference for class Foo:

<?xml version="1.0" encoding="UTF-8"?>
<serializer>
    <class name="Foo">
        <property name="array" type="array" xml-attribute-map="true" />
    </class>
</serializer>
class Foo
{
    private $array = [
        'name' => 'firstname',
        'value' => 'lastname'
    ];
}

When I try serialize this class I'm expecting to get the result as shown below but instead getting an error that the property array cannot be serialized because it contains not allowed characters.

<result name="firstname" value="lastname"/>

After investigation I found the mismatch between xml file property and property in metadata class.
This commit fixed this issue.

@goetas
Copy link
Collaborator

goetas commented Jul 10, 2016

👍

@goetas goetas added the To Merge label Aug 3, 2016
@goetas goetas added this to the v1.2 milestone Aug 3, 2016
@goetas goetas merged commit ef0bfc4 into schmittjoh:master Aug 3, 2016
@goetas
Copy link
Collaborator

goetas commented Aug 3, 2016

Thank you

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.

2 participants