therealsujitk / flarum-ext-gifs

A Flarum extension that integrates your forum with GIF search engines.
https://discuss.flarum.org/d/23101
MIT License
5 stars 8 forks source link

Resolve SettingsRepositoryInterface as late as possible #5

Closed clarkwinkelmann closed 4 years ago

clarkwinkelmann commented 4 years ago

This gives the opportunity to other extensions to change its implementation Also added the missing check for ForumSerializer so that the value only gets added to the forum payload and not every other serialized payload

This change would allow extenders like the one I provide in https://github.com/clarkwinkelmann/flarum-local-extenders#override-settings to override the setting value.

Let me know if you would have preferred I keep the original file formatting. My PhpStorm automatically formatted the file according to PSR-2.

This second PR uses the solution @franzliedke recommended in #4

therealsujitk commented 4 years ago

@clarkwinkelmann thanks! I cannot test this right now or anytime soon because of several reasons but I will merge this pull request anyway because of your reputation with Flarum.

clarkwinkelmann commented 4 years ago

I did test the PR locally before submitting it :+1: