-
-
Notifications
You must be signed in to change notification settings - Fork 922
Backport #1014 (also includes #907) #1097
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
Conversation
$doctrineClassMetadata = $manager->getClassMetadata($resourceClass); | ||
$doctrineIdentifierFields = $doctrineClassMetadata->getIdentifier(); | ||
$isOrm = interface_exists(EntityManagerInterface::class) && $manager instanceof EntityManagerInterface; | ||
$platform = $isOrm ? $manager->getConnection()->getDatabasePlatform() : null; |
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.
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\(\)#'
c431be1
to
40798a1
Compare
@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. |
@teohhanhui check #1099 (comment) |
@soyuka There is another failure: And the JSON node "_embedded.item" should have 1 element
|
This problem is resolved by #1102. |
40798a1
to
1265798
Compare
Rebased. ping @api-platform/core-team |
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.
nice, we should merge this 👍
Thanks @teohhanhui |
…1014 Backport api-platform#1014 (also includes api-platform#907)
Since it's not feasible to backport #1014 without #907, I've included both. Basically just copy-pasted these files from master \o/