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

Updated ValueInjection to check array values as these can be exportable #50

Merged
merged 3 commits into from
Jan 10, 2019
Merged

Updated ValueInjection to check array values as these can be exportable #50

merged 3 commits into from
Jan 10, 2019

Conversation

michalbundyra
Copy link
Member

@michalbundyra michalbundyra commented Jan 9, 2019

Extracted logic from isExportable function to private function and use recursion for arrays.

Because array values (especially empty array values) were not recognised as exportable factories for classes with empty array as default value for param were not created.

  • Are you fixing a bug?
    • Detail how the bug is invoked currently.
    • Detail the original, incorrect behavior.
    • Detail the new, expected behavior.
    • Base your feature on the master branch, and submit against that branch.
    • Add a regression test that demonstrates the bug, and proves the fix.
    • Add a CHANGELOG.md entry for the fix.

Extracted logic from isExportable function to private function
and use recursion for arrays.
@tux-rampage tux-rampage self-assigned this Jan 9, 2019
Copy link
Contributor

@tux-rampage tux-rampage left a comment

Choose a reason for hiding this comment

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

Looks good. Just a minor nitpick. I'd consider it as bug as well, if there are no objections I'd target this to 3.1.1 - @Ocramius ?

src/Resolver/ValueInjection.php Outdated Show resolved Hide resolved
@tux-rampage tux-rampage added this to the 3.1.1 milestone Jan 9, 2019
@tux-rampage tux-rampage added the bug label Jan 9, 2019
@tux-rampage tux-rampage merged commit 1c26455 into zendframework:master Jan 10, 2019
tux-rampage added a commit that referenced this pull request Jan 10, 2019
…ble-arrays

Updated ValueInjection to check array values as these can be exportable
@michalbundyra michalbundyra deleted the hotfix/value-injection-exportable-arrays branch January 10, 2019 09:17
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.

None yet

2 participants