作者:小美女阿风 | 来源:互联网 | 2023-09-17 22:55
Fixes part of #1891
Fixes #2420
Changes proposed in this pull request:
This PR deprecates the
event; instead, extensions that need to set this should listen to the discussion
event, and set
there. I see no reason to treat
differently than other attributes of models. It's also only present on 2 models (without plans to be included on others, as far as I can tell). A full extender doesn't really make sense.
This will affect the downstream approval and byobu extensions, possibly others (I think php import query on https://query.flarum.dev might be broken).
Confirmed
- [ ] Frontend changes: tested on a local Flarum installation.
- [ ] Backend changes: tests are green (run
).
Required changes:
- [ ] Related documentation PR: (Remove if irrelevant)
- [ ] Related core extension PRs: (Remove if irrelevant)
该提问来源于开源项目:flarum/core
I think coming up with the extender first would make more sense, before starting to deprecate or remove code behind the scenes.
This is one of the things I was hoping to remove without an extender as replacement. I feel like it's way to specialized for a dedicated extender. But the Eloquent saving event concern is a good point... I suppose we could introduce this as separate methods on the
and
extender, or move that code out into a trait, and use a
extender?