Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Fix generation of non-optional object parameters that can be null. #95

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

digilist
Copy link
Contributor

Consider the following example:

class Foo {
    public function doSomething(\stdClass $a = null, $b) {
    }
}

By generating a method from the ReflectionMethod of the given code above, the generated code did not consider the default value from $a. This has the effect, that one cannot pass null into that variable any more.

This PR fixes this. See also Ocramius/ProxyManager#337

Example: function foo(\stdClass $a = null, $b)
Copy link
Contributor

@adamlundrigan adamlundrigan left a comment

Choose a reason for hiding this comment

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

Makes sense to me but I'll defer to @Ocramius

Ocramius added a commit that referenced this pull request Oct 24, 2016
Ocramius added a commit that referenced this pull request Oct 24, 2016
@Ocramius Ocramius merged commit f125de0 into zendframework:master Oct 24, 2016
Ocramius added a commit that referenced this pull request Oct 24, 2016
@Ocramius Ocramius self-assigned this Oct 24, 2016
@Ocramius Ocramius added this to the 3.0.5 milestone Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants