Was just reading https://discuss.flarum.org/d/12529-can-i-remove-an-extention-on-flarum
Obviously needing to run rm -f assets/rev-manifest.json is a bug, will be fixed as part of #1309
But should we automatically run php flarum cache:clear whenever you run a composer install/update/remove command by adding it as a script in composer.json?
I think this would most likely be fixed when #881 (comment) (from Franz's comment in #837) is fixed, and/or maybe #837.
All these issues are most likely connected, and while #837 is about the CLI command, it may fix this while the command is being improved with the changes it brings.
Did this make any sense...? 馃
I'm in doubt. Without using the composer flag --without-scripts there would be no way to circumvent clearing the cache. In some situations it might be better to have full control over when to do that, eg after running migrations.
On the other hand I like the ease of use this brings, but as said running migrations then should possible be part of the post-update-cmd?
The problem I see with running the cache clear script when you require an extension is that the LESS from the extension isn't actually added to the forum's and admin's LESS until it's enabled. Clearing the cache on require wouldn't do anything.
@CDK2020 this is true. We should have a php flarum command for enabling/disabling extensions - we can clear the cache as part of those.
Most helpful comment
@CDK2020 this is true. We should have a
php flarumcommand for enabling/disabling extensions - we can clear the cache as part of those.