-
Notifications
You must be signed in to change notification settings - Fork 517
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
Fix mongodb changeset #1277
Fix mongodb changeset #1277
Conversation
0cb6ffa
to
5ae91af
Compare
@garak I think this is now ready to go - just the PHPStan errors needs some fixing but most of it doesn't seem to be related to this PR itself. |
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.
Are we forced to change an interface? If so, we need to update the changelog with proper instructions. If approved, this change can't be published before the next minor version.
Moreover, the errors reported by phpstan look related to proposed changes.
Unfortunately, this
If we really don't want to touch the interface, we could shift this logic to the listener itself but that would defeat the purpose of using the adapter, especially that the adapter is marked as I will take a look at PHPStan errors again and solve them in next commit 👍🏻 |
@@ -1,9 +1,9 @@ | |||
parameters: | |||
ignoreErrors: | |||
- | |||
message: "#^Method Vich\\\\UploaderBundle\\\\Adapter\\\\AdapterInterface\\:\\:recomputeChangeSet\\(\\) has no return type specified\\.$#" | |||
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getUnitOfWork\\(\\)\\.$#" |
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.
This error is ignored because the object returned from getObjectManager()
is an instance of Doctrine\ODM\PHPCR\DocumentManagerInterface
(https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentManagerInterface.php) but we are not installing this package so phpstan can't analyze this.
@IonBazan I'm not against the interface change, but this PR should include an update to changelog |
Any news? |
@garak sorry, I think the issue that this PR was initially trying to fix has been solved in v1.19.1. I will rebase it and simplify the interface changes then. |
7c1edf2
to
0486de5
Compare
@garak I think this is now ready for a review again. Let me know if the changes still make sense after the changes from v1.19. |
Do you mind proposing the same changes on the master branch? |
This PR tries to fix the entity/document listeners by:
Doctrine\Persistence
eventsgetObject()
from the event itself instead of using Adapter- AddinggetChangeSet()
to the adapter itself so it can be customizedThe MongoDB ODM part is a bit poorly tested as many classes are
final
which makes it really difficult to test.