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

Non-variadic parameter should not throw exception when calling ParameterGenerator#setVariadic(false) with an existing default value #173

Merged
merged 5 commits into from
Mar 4, 2023

Conversation

sakhunzai
Copy link
Contributor

@sakhunzai sakhunzai commented Mar 3, 2023

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA yes

Description

Fix the changes introduce in PR #72 by ensuring call to setVariadic should not throw exception when parameter is non variadic.

setVariadic should only throw exception when parameter is variadic and has default value.

Signed-off-by: sakhunzai <[email protected]>
Non variadic parameter should not throw exception when having default value

Signed-off-by: sakhunzai <[email protected]>
@sakhunzai sakhunzai changed the title Fix the issue Non-variadic parameter should not throw exception Mar 3, 2023
remote whitespaces

Signed-off-by: sakhunzai <[email protected]>
remote whitespaces

Signed-off-by: sakhunzai <[email protected]>
@Ocramius Ocramius self-assigned this Mar 3, 2023
@Ocramius Ocramius added Bug Something isn't working Enhancement labels Mar 3, 2023
@Ocramius Ocramius added this to the 4.9.0 milestone Mar 3, 2023
test/Generator/ParameterGeneratorTest.php Outdated Show resolved Hide resolved
test/Generator/ParameterGeneratorTest.php Outdated Show resolved Hide resolved
added  generated code expectation

Signed-off-by: sakhunzai <[email protected]>
@sakhunzai sakhunzai closed this Mar 3, 2023
@sakhunzai sakhunzai reopened this Mar 3, 2023
@sakhunzai
Copy link
Contributor Author

please review changes

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Excellent, thanks @sakhunzai!

@Ocramius Ocramius assigned Ocramius and unassigned sakhunzai Mar 4, 2023
@Ocramius Ocramius changed the title Non-variadic parameter should not throw exception Non-variadic parameter should not throw exception when calling ParameterGenerator#setVariadic(false) with an existing default value Mar 4, 2023
@Ocramius Ocramius merged commit c1706ec into laminas:4.9.x Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants