Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Shift) Laravel 12.x.x #4500

Open
wants to merge 32 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
18eab8f
Convert string references to `::class`
laravel-shift Feb 25, 2025
14e13e8
Use Faker methods
laravel-shift Feb 25, 2025
51394a0
Remove unnecessary `$model` property
laravel-shift Feb 25, 2025
8d845cf
Convert route options to fluent methods
laravel-shift Feb 25, 2025
cad18ef
Slim `lang` files
laravel-shift Feb 25, 2025
8392f79
Shift core files
laravel-shift Feb 25, 2025
40845c0
Adopt new PHP attributes in models
laravel-shift Feb 25, 2025
bdfa733
Remove unused `ValidatesRequests` trait
laravel-shift Feb 25, 2025
731e811
Remove unused `AuthorizesRequests` trait
laravel-shift Feb 25, 2025
21da0f0
Remove base controller inheritance
laravel-shift Feb 25, 2025
fec634e
Shift config files
laravel-shift Feb 25, 2025
a802ca2
Default config files
laravel-shift Feb 25, 2025
7d5ee66
Set new `ENV` variables
laravel-shift Feb 25, 2025
5f15605
Add new Laravel `composer run dev` script
laravel-shift Feb 25, 2025
9414858
Add `storage/app/private` folder
laravel-shift Feb 25, 2025
a1225a8
Bump Composer dependencies
laravel-shift Feb 25, 2025
2526fa4
Rename `password_resets` table
laravel-shift Feb 25, 2025
27f9fe4
Adopt Laravel type hints
laravel-shift Feb 25, 2025
1604d61
Shift cleanup
laravel-shift Feb 25, 2025
60268e4
Blade Style Change (Prettier Blade CI)
HDVinnie Feb 25, 2025
cd8a331
revert: "Convert string references to `::class`"
HDVinnie Feb 27, 2025
b57f019
revert: "Slim `lang` files"
HDVinnie Feb 27, 2025
de428a0
remove: old observer comment
HDVinnie Feb 27, 2025
8d35382
revert: config changes
HDVinnie Feb 27, 2025
29cb520
update: composer.json
HDVinnie Feb 27, 2025
1133a87
update: composer dependencies
HDVinnie Feb 27, 2025
f4cd00f
update: composer dependencies
HDVinnie Feb 28, 2025
8d6ecf1
update: remove old excludes from phpstan.neon
HDVinnie Feb 28, 2025
3edbc78
remove: old markdown test
HDVinnie Feb 28, 2025
b634be9
update: .cspell/laravel.txt
HDVinnie Feb 28, 2025
2e170ad
update: markdown helper
HDVinnie Feb 28, 2025
c966bd6
update: laravel 12 support
HDVinnie Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions app/Models/Application.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Attributes\ScopedBy;
use App\Models\Scopes\ApprovedScope;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
@@ -35,6 +36,7 @@
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
*/
#[ScopedBy([ApprovedScope::class])]
class Application extends Model
{
use Auditable;
@@ -65,11 +67,6 @@ protected function casts(): array
*/
protected $guarded = ['id', 'created_at', 'updated_at'];

protected static function booted(): void
{
static::addGlobalScope(new ApprovedScope());
}

/**
* Belongs To A User.
*
7 changes: 2 additions & 5 deletions app/Models/Subtitle.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Attributes\ScopedBy;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Helpers\StringHelper;
use App\Models\Scopes\ApprovedScope;
@@ -43,6 +44,7 @@
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
*/
#[ScopedBy([ApprovedScope::class])]
class Subtitle extends Model
{
use Auditable;
@@ -67,11 +69,6 @@ protected function casts(): array
];
}

protected static function booted(): void
{
static::addGlobalScope(new ApprovedScope());
}

/**
* Belongs To A User.
*
7 changes: 2 additions & 5 deletions app/Models/Torrent.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Attributes\ScopedBy;
use App\Helpers\StringHelper;
use App\Models\Scopes\ApprovedScope;
use App\Notifications\NewComment;
@@ -80,6 +81,7 @@
* @property int|null $balance
* @property int|null $balance_offset
*/
#[ScopedBy([ApprovedScope::class])]
class Torrent extends Model
{
use Auditable;
@@ -475,11 +477,6 @@ protected function casts(): array
) AS json_keywords
SQL;

protected static function booted(): void
{
static::addGlobalScope(new ApprovedScope());
}

/**
* Belongs To A User.
*
3 changes: 3 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@

namespace App\Models;

use App\Observers\UserObserver;
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
use App\Helpers\StringHelper;
use App\Traits\UsersOnlineTrait;
use Assada\Achievements\Achiever;
@@ -74,6 +76,7 @@
* @property int $own_flushes
* @property string|null $email_verified_at
*/
#[ObservedBy([UserObserver::class])]
class User extends Authenticatable implements MustVerifyEmail
{
use Achiever;
2 changes: 0 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
use App\Helpers\HiddenCaptcha;
use App\Interfaces\ByteUnitsInterface;
use App\Models\User;
use App\Observers\UserObserver;
use App\View\Composers\FooterComposer;
use App\View\Composers\TopNavComposer;
use Illuminate\Support\Facades\Blade;
@@ -52,7 +51,6 @@ public function register(): void
public function boot(): void
{
// User Observer For Cache
User::observe(UserObserver::class);

// Hidden Captcha
Blade::directive('hiddencaptcha', fn ($mustBeEmptyField = '_username') => \sprintf('<?= App\Helpers\HiddenCaptcha::render(%s); ?>', $mustBeEmptyField));