mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
chore: bump dependencies (#1207)
This commit is contained in:
@@ -23,6 +23,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
*/
|
||||
public function update(User $user, array $input): void
|
||||
{
|
||||
/** @var array{name: string, email: string} $validated */
|
||||
$validated = Validator::make($input, [
|
||||
User::ATTRIBUTE_NAME => ['required_without:'.User::ATTRIBUTE_EMAIL, 'string', 'max:35', 'alpha_dash', Rule::unique(User::class)->ignore($user->id), new ModerationRule()],
|
||||
User::ATTRIBUTE_EMAIL => ['required_without:'.User::ATTRIBUTE_NAME, 'string', 'email', 'max:255', 'indisposable', Rule::unique(User::class)->ignore($user->id)],
|
||||
|
||||
@@ -6,13 +6,13 @@ namespace App\Console\Commands\Storage\Base;
|
||||
|
||||
use App\Actions\Storage\Base\PruneAction;
|
||||
use App\Console\Commands\Storage\StorageCommand;
|
||||
use Illuminate\Console\Attributes\Description;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
use Illuminate\Support\Facades\Validator as ValidatorFacade;
|
||||
|
||||
#[Description('Prune stale files from storage')]
|
||||
abstract class PruneCommand extends StorageCommand
|
||||
{
|
||||
protected $description = 'Prune stale files from storage';
|
||||
|
||||
abstract protected function getAction(): PruneAction;
|
||||
|
||||
protected function validator(): Validator
|
||||
|
||||
@@ -40,6 +40,7 @@ class PlaylistMutation
|
||||
Playlist::ATTRIBUTE_USER => Auth::id(),
|
||||
];
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return Playlist::query()->create($parameters);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ class Prohibition extends BaseProhibition implements Nameable
|
||||
{
|
||||
$tableName = Config::string('prohibition.table_names.model_prohibitions');
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return $query->where("$tableName.expires_at", '<', now());
|
||||
}
|
||||
|
||||
@@ -50,6 +51,7 @@ class Prohibition extends BaseProhibition implements Nameable
|
||||
{
|
||||
$tableName = Config::string('prohibition.table_names.model_prohibitions');
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return $query->where("$tableName.expires_at", '>', now())
|
||||
->orWhereNull("$tableName.expires_at");
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ class Sanction extends BaseSanction implements Nameable
|
||||
{
|
||||
$tableName = Config::string('prohibition.table_names.model_sanctions');
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return $query->where("$tableName.expires_at", '<', now());
|
||||
}
|
||||
|
||||
@@ -50,6 +51,7 @@ class Sanction extends BaseSanction implements Nameable
|
||||
{
|
||||
$tableName = Config::string('prohibition.table_names.model_sanctions');
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return $query->where("$tableName.expires_at", '>', now())
|
||||
->orWhereNull("$tableName.expires_at");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace App\Models;
|
||||
use App\Contracts\Models\HasSubtitle;
|
||||
use App\Contracts\Models\Nameable;
|
||||
use App\Models\Admin\Activity;
|
||||
use Illuminate\Database\Eloquent\Attributes\DateFormat;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Support\Carbon;
|
||||
@@ -17,15 +18,9 @@ use Illuminate\Support\Str;
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*/
|
||||
#[DateFormat('Y-m-d\TH:i:s.u')]
|
||||
abstract class BaseModel extends Model implements HasSubtitle, Nameable
|
||||
{
|
||||
/**
|
||||
* The storage format of the model's date columns.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $dateFormat = 'Y-m-d\TH:i:s.u';
|
||||
|
||||
final public const ATTRIBUTE_CREATED_AT = Model::CREATED_AT;
|
||||
final public const ATTRIBUTE_UPDATED_AT = Model::UPDATED_AT;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Pivots;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\DateFormat;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphPivot;
|
||||
@@ -14,6 +15,7 @@ use Illuminate\Support\Carbon;
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*/
|
||||
#[DateFormat('Y-m-d\TH:i:s.u')]
|
||||
abstract class BaseMorphPivot extends MorphPivot
|
||||
{
|
||||
use HasFactory;
|
||||
@@ -28,9 +30,4 @@ abstract class BaseMorphPivot extends MorphPivot
|
||||
* @var bool
|
||||
*/
|
||||
public $incrementing = true;
|
||||
|
||||
/**
|
||||
* The storage format of the model's date columns.
|
||||
*/
|
||||
protected $dateFormat = 'Y-m-d\TH:i:s.u';
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Pivots;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\DateFormat;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
@@ -14,6 +15,7 @@ use Illuminate\Support\Carbon;
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*/
|
||||
#[DateFormat('Y-m-d\TH:i:s.u')]
|
||||
abstract class BasePivot extends Pivot
|
||||
{
|
||||
use HasFactory;
|
||||
@@ -28,9 +30,4 @@ abstract class BasePivot extends Pivot
|
||||
* @var bool
|
||||
*/
|
||||
public $incrementing = true;
|
||||
|
||||
/**
|
||||
* The storage format of the model's date columns.
|
||||
*/
|
||||
protected $dateFormat = 'Y-m-d\TH:i:s.u';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user