jbouzekri / FileUploaderBundle

Aggregate some bundles and libraries to provide easy ajax file upload integration with crop
MIT License
23 stars 7 forks source link

Symfony 3 Support #19

Closed behram closed 7 years ago

behram commented 7 years ago
behram commented 7 years ago

@jbouzekri i could not test all functions manually. But on my system i am using most of features, and works well with Symfony 3

jbouzekri commented 7 years ago

@behram Thanks for this. Quite a lot of work ... ;) I will try to test it this evening.

jbouzekri commented 7 years ago

I am having an issue with the event post_persist de oneup being triggered 2 times. You have this service jb_fileuploader.file_ajax.upload_listener which listen on this event. As it is triggered 2 times, it tries to persist the FileHistory entity 2 times which result with a unique constraint exception on the file_name.

jbouzekri commented 7 years ago

It seems that I need to remove the shared: false to make it works. I cannot look more into it today and I won't have a lot of time this week. Can you check what is happening ?

One possible solution is to remove the shared: false settings and check in each service if we have a call to the request. In that case, we should use the request_stack service.

behram commented 7 years ago

@jbouzekri you are right. removing shared configuration works correctly. i am working today on this bundle. i will revise other remaining issues. i will ping you when i finished

jbouzekri commented 7 years ago

We are almost there. Can you do these 2 changes ?

  1. Remove all shared: false or setShared(false) settings (in DependencyInjection and in resolvers).
  2. rebase this pull request interactively to squash everything in one big commit with a comment like "sf3 support"

Then I will merge it and tag the repository.

Thanks

behram commented 7 years ago

@jbouzekri great 🙏 👏

jbouzekri commented 7 years ago

@behram thanks to you for your work.