Serializer support #1

Open
wants to merge 7 commits into from

2 participants

@leahaense

No description provided.

@leahaense

this is needed to reset the groups settings between different types. I noticed that passing an empty array does not work.

hmm this is strange ..

php -r 'var_dump((bool)array());'
bool(false)
    public function setGroups($groups)
    {
        if ( ! $groups) {
            $this->exclusionStrategy = null;

            return;
        }

        $this->exclusionStrategy = new GroupsExclusionStrategy((array) $groups);
    }

@schmittjoh?

ah wait, I think the problem was another one. When there is no configuration for groups for one type in the mapping, but there was groups for the type handled before, setGroup is not called and hence the serializer still has the group settings from before. I'm not sure if this is still a problem with the current implementation though. I'll check tomorrow.

Ok, I tested it, it works fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment