mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
chore: handle deprecations from 1.x (#3909)
* chore: drop deprecated `post_number_index` column * chore: remove deprecated `FlagsWillBeDeleted` event * chore: `Migration::addSettings` can still be needed * chore: `settings->get` default can still be needed * chore: deprecated `$default` in `Settings::serializeToForum` extender * chore: deprecated request `actor` attribute * chore: already handled * chore: remove `RecompileFrontendAssets::whenSettingsSaved` * chore: remove `getReadIds` * chore: `Model::dateAttribute` extender * chore: `evented` js util * chore: `WelcomeHero` js hidden prop * chore: attributes pushData with relations * chore: app request options `extract` * chore: itemlist deprecations * chore: `search` state * chore: `getMentionText` * chore: deprecated non-registered store type * chore: `Button` title * chore: `Modal` deprecations * chore * chore: deprecated `less` mixins * Apply fixes from StyleCI * fix * fix: phpstan * fix * fix --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -54,7 +54,7 @@ export default function () {
|
||||
|
||||
const controls = PostControls.destructiveControls(this.attrs.post);
|
||||
|
||||
Object.keys(controls.items).forEach((k) => {
|
||||
Object.keys(controls.toObject()).forEach((k) => {
|
||||
const attrs = controls.get(k).attrs;
|
||||
|
||||
attrs.className = 'Button';
|
||||
|
@@ -10,7 +10,6 @@
|
||||
namespace Flarum\Flags\Command;
|
||||
|
||||
use Flarum\Flags\Event\Deleting;
|
||||
use Flarum\Flags\Event\FlagsWillBeDeleted;
|
||||
use Flarum\Post\Post;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
@@ -31,9 +30,6 @@ class DeleteFlagsHandler
|
||||
|
||||
$actor->assertCan('viewFlags', $post->discussion);
|
||||
|
||||
// Deprecated, removed v2.0
|
||||
$this->events->dispatch(new FlagsWillBeDeleted($post, $actor, $command->data));
|
||||
|
||||
foreach ($post->flags as $flag) {
|
||||
$this->events->dispatch(new Deleting($flag, $actor, $command->data));
|
||||
}
|
||||
|
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Flags\Event;
|
||||
|
||||
use Flarum\Post\Post;
|
||||
use Flarum\User\User;
|
||||
|
||||
/**
|
||||
* @deprecated v2.0
|
||||
* Listen for Flarum\Flags\Event\Deleting instead
|
||||
*/
|
||||
class FlagsWillBeDeleted
|
||||
{
|
||||
public function __construct(
|
||||
public Post $post,
|
||||
public User $actor,
|
||||
public array $data = []
|
||||
) {
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user