FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
177 stars 96 forks source link

Use Flarum's View extender #252

Closed clarkwinkelmann closed 3 years ago

clarkwinkelmann commented 3 years ago

Upload is currently loading views using ServiceProvider::loadViewsFrom()

https://github.com/FriendsOfFlarum/upload/blob/d9fc9db13e1ece28a75fd79dfcdbba76a78341aa/src/Providers/DownloadProvider.php#L22

Unlike other extensions which broke other extension's namespace, using loadViewsFrom seems to be actually fine (because it uses afterResolving on the view binding behind the scenes). I tested various load orders with other extensions and could not trigger any error.

We still want to move to Flarum's Extend\View extender to use the public Flarum API and not give a wrong example.

imorland commented 3 years ago

Changed, https://github.com/FriendsOfFlarum/upload/commit/2bf761cabe1aa7d8e1aace8a05ae68549cf7e391