Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PropertyInfo] Extract from default value doesn't set collection boolean #38445

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

Closed
Korbeil opened this issue Oct 6, 2020 · 0 comments
Closed

Comments

@Korbeil
Copy link
Contributor

Korbeil commented Oct 6, 2020

Symfony version(s) affected: >= 5.1.7

Description
Since #38041, the extractFromDefaultValue function will be called before the reflection property.
Because of that, we will detect the array type, but we do not set the collection boolean.

I found this because of janephp/janephp#425.

How to reproduce
You can find a reproducer on the following repository: https://github.com/Korbeil/property-info-collection

@Korbeil Korbeil added the Bug label Oct 6, 2020
@fabpot fabpot closed this as completed Oct 7, 2020
fabpot added a commit that referenced this issue Oct 7, 2020
…ection boolean (Korbeil)

This PR was merged into the 5.1 branch.

Discussion
----------

[PropertyInfo] Extract from default value doesn't set collection boolean

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38445
| License       | MIT
| Doc PR        | N/A

This PR will fix the issue by checking if the type is an array or not and setting the collection boolean based on this check.

Commits
-------

33d37e5 Fix no collection in extract default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants