dustin10 / VichUploaderBundle

A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
MIT License
1.85k stars 519 forks source link

Fix mongodb changeset #1277

Closed IonBazan closed 1 year ago

IonBazan commented 2 years ago

This PR tries to fix the entity/document listeners by:

The MongoDB ODM part is a bit poorly tested as many classes are final which makes it really difficult to test.

IonBazan commented 2 years ago

@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.

IonBazan commented 2 years ago

Unfortunately, this AdapterInterface change is mandatory:

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 @internal since v1.19.0.

I will take a look at PHPStan errors again and solve them in next commit 👍🏻

garak commented 2 years ago

@IonBazan I'm not against the interface change, but this PR should include an update to changelog

garak commented 2 years ago

Any news?

IonBazan commented 2 years ago

@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.

IonBazan commented 2 years ago

@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. I've also added some UPGRADING.md notes to highlight the changes in AdapterInterface.

garak commented 2 years ago

Do you mind proposing the same changes on the master branch?