Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Allow Upper Case property names#22265
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible```class Entity { protected $Id; public function getId() { return $this->Id; }}```symfony/symfony#22265
dunglas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
dunglas commentedApr 4, 2017
Can you cover this with an unit test? |
insekticid commentedApr 4, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Added phpunit tests You need manually rerun build checks:
|
nicolas-grekas commentedApr 4, 2017
small rebase needed |
nicolas-grekas commentedApr 4, 2017
should be merged on 2.7, isn't it? |
nicolas-grekas commentedApr 4, 2017
👍 |
insekticid commentedApr 4, 2017
Symfony 2.7+ So what to do now? It will be automatically merged into Symfony 3 too? |
fabpot commentedApr 4, 2017
@insekticid That's correct. We are merging bug fixes in the lowest branch where the bug exist and then merge it back to all other branches (2.8, 3.2, and master right now). Can you change the target of the PR and rebase it? Thanks. |
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible```class Entity { protected $Id; public function getId() { return $this->Id; }}```# Conflicts:#src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php#src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.phpinsekticid commentedApr 4, 2017
@fabpot PropertyInfo exists since Sf 2.8 so I remade patch-1 for remotes/origin/2.8 |
fabpot commentedApr 4, 2017
@insekticid You forgot to change the branch of the PR |
insekticid commentedApr 4, 2017
@fabpot where? in commit message? |
fabpot commentedApr 4, 2017
Thank you@insekticid. |
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes#22265).Discussion----------Allow Upper Case property namesReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible```class Entity { protected $Id; public function getId() { return $this->Id; }}```| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | yes| Deprecations? | no| Tests pass? | no| License | MITapi-platform/core#1026Commits-------2fe1631 Allow Upper Case property names
fabpot commentedApr 4, 2017
Nevermind, I've done the switch when merging. FYI, that's just after the PR title, the branch you asked this PR to be merged in. |
insekticid commentedApr 4, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@fabpot aha, so next time a I should close old (this) pull req. and made new one to 2.8 branch? edit: found it :) Simply Edit this pull |
fabpot commentedApr 4, 2017
No need to close it. You can now (that was changed recentyl on Github) update the target on a PR. |
…ticid)This PR was merged into the 2.8 branch.Discussion----------Allow Upper Case property names in ObjectNormalizer| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | yes| Deprecations? | no| Tests pass? | yes| Fixed tickets |#22547| License | MITSame problem that has been fixed here#22265and hereapi-platform/core#1037ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible```phpclass Entity { protected $Id; public function getId() { return $this->Id; }}```Commits-------b2b4faa Allow Upper Case property names in ObjectNormalizer
| Q | A| ---------------- | -----| Bug report? | yes| Feature request? | no| BC Break report? | yes| RFC? | no| Symfony version | 2.8.19Same problem that has been fixed heresymfony/symfony#22265and hereapi-platform/core#1037ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible```phpclass Entity { protected $Id; public function getId() { return $this->Id; }}```
…ticid)This PR was merged into the 2.8 branch.Discussion----------Allow Upper Case property names in ObjectNormalizer| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | yes| Deprecations? | no| Tests pass? | yes| Fixed tickets | #22547| License | MITSame problem that has been fixed heresymfony/symfony#22265and hereapi-platform/core#1037ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible```phpclass Entity { protected $Id; public function getId() { return $this->Id; }}```Commits-------b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
Uh oh!
There was an error while loading.Please reload this page.
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible
api-platform/core#1026