As complex as you want it to be, I guess? If you enable it by default though, someone will ask for a switch to disable it. If you disable it, you'll need to clear the cache withDavidIQ wrote: Thu Sep 08, 2016 5:32 pm how complex is such an extension actually going to be for that line?
$phpbb_container->get('text_formatter.cache')->invalidate()
. There's a chance that having it as an extension would actually require less code because you don't have to have a switch for it (users can disable the extension) and the cache gets cleared when it's toggled.Having new features as extensions lets you update them more often than the base installation too.
Finally, if it's enabled by default you'll want to have a way to configure which sites get auto-embedded. Otherwise you'll have a bunch of reports from people complaining that Amazon links disappear, or maybe that Facebook links disappear. That's because many users run adblockers by default and they tend to hide embedded Amazon products. Firefox is going gung-ho with privacy tracking and it could start interfering with Facebook embeds or tweets in the future.