Backport #1014 (also includes #907)#1097
Merged
dunglas merged 2 commits intoapi-platform:2.0from May 15, 2017
Merged
Conversation
soyuka
reviewed
May 4, 2017
| $doctrineClassMetadata = $manager->getClassMetadata($resourceClass); | ||
| $doctrineIdentifierFields = $doctrineClassMetadata->getIdentifier(); | ||
| $isOrm = interface_exists(EntityManagerInterface::class) && $manager instanceof EntityManagerInterface; | ||
| $platform = $isOrm ? $manager->getConnection()->getDatabasePlatform() : null; |
Member
There was a problem hiding this comment.
phpstan isn't happy with this :| We added the following in phpstan.neon on master:
- '#Call to an undefined method Doctrine\\Common\\Persistence\\ObjectManager::getConnection\(\)#'
soyuka
approved these changes
May 4, 2017
c431be1 to
40798a1
Compare
Contributor
Author
|
@dunglas Behat tests failed for me (the same 7 scenarios failed, like PHP 7.0 on Travis) on my local PHP 7.1.4 environment as well (using api-platform Docker php image). I'm afraid it's a problem with our code. |
Member
|
@teohhanhui check #1099 (comment) |
Contributor
Author
|
@soyuka There is another failure: And the JSON node "_embedded.item" should have 1 element |
Member
|
This problem is resolved by #1102. |
40798a1 to
1265798
Compare
Contributor
Author
|
Rebased. ping @api-platform/core-team |
Simperfit
approved these changes
May 15, 2017
Member
|
Thanks @teohhanhui |
hoangnd25
pushed a commit
to hoangnd25/core
that referenced
this pull request
Feb 23, 2018
…1014 Backport api-platform#1014 (also includes api-platform#907)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since it's not feasible to backport #1014 without #907, I've included both. Basically just copy-pasted these files from master \o/