iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: https://github.com/symfony/symfony/pull/22426
[PropertyInfo] Prevent returning int values in some cases by dunglas · Pull Request #22426 · symfony/symfony · GitHub
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

[PropertyInfo] Prevent returning int values in some cases #22426

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Apr 13, 2017

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets api-platform/api-platform#282, api-platform/core#1055
License MIT
Doc PR n/a

PHP automatically converts array keys to an int if and only if it looks like an int... When a getter looks like get123, the ReflectionExtractor returns an array containing an int instead of a string. This PR fixes this.

@fabpot
Copy link
Member

fabpot commented Apr 13, 2017

Thank you @dunglas.

@fabpot fabpot merged commit b190ec2 into symfony:2.8 Apr 13, 2017
fabpot added a commit that referenced this pull request Apr 13, 2017
…(dunglas)

This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Prevent returning int values in some cases

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | api-platform/api-platform#282, api-platform/core#1055
| License       | MIT
| Doc PR        | n/a

PHP automatically converts array keys to an int if and only if it looks like an int... When a getter looks like `get123`, the ReflectionExtractor returns an array containing an int instead of a string. This PR fixes this.

Commits
-------

b190ec2 [PropertyInfo] Prevent returning int values in some cases.
@dunglas dunglas deleted the fix_api_platform_282 branch April 13, 2017 20:17
This was referenced May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants