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

Laravel 11.x Shift #735

Merged
merged 27 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c7793c3
Apply Laravel coding style
laravel-shift Nov 28, 2024
a85868f
Remove default `app` files
laravel-shift Nov 28, 2024
06aa706
Shift core files
laravel-shift Nov 28, 2024
d222b30
Streamline config files
laravel-shift Nov 28, 2024
1041660
Set new `ENV` variables
laravel-shift Nov 28, 2024
9c347ed
Default new `bootstrap/app.php`
laravel-shift Nov 28, 2024
7cf3e27
Re-register HTTP middleware
laravel-shift Nov 28, 2024
c7c1e94
Consolidate service providers
laravel-shift Nov 28, 2024
ab3ebce
Re-register service providers
laravel-shift Nov 28, 2024
e3a7908
Re-register exception handling
laravel-shift Nov 28, 2024
469c42a
Re-register routes
laravel-shift Nov 28, 2024
44de85a
Remove unnecessary Console Kernel
laravel-shift Nov 28, 2024
d366fcd
Bump Composer dependencies
laravel-shift Nov 28, 2024
d62ba39
Adopt Laravel type hints
laravel-shift Nov 28, 2024
52f33ab
Mark base controller as `abstract`
laravel-shift Nov 28, 2024
f7ac008
Remove `CreatesApplication` testing trait
laravel-shift Nov 28, 2024
522b053
Shift cleanup
laravel-shift Nov 28, 2024
825aae6
fix(deps): remove dependency on `laravelcollective/html`
Pyker Nov 28, 2024
b564021
chore: properly ignore .env files
Pyker Nov 28, 2024
ed31eb7
fix: remove ancient middleware priority
Pyker Nov 28, 2024
16a3338
fix: correct dashboard URL
Pyker Nov 28, 2024
3c543c2
fix: clean up config files
Pyker Nov 28, 2024
84e103e
fix(deps): remove unnecessary dependency on `doctrine/dbal`
Pyker Nov 28, 2024
a8ada05
fix: update user model code
Pyker Nov 28, 2024
d69bde8
Ignore PHPUnit cache folder
laravel-shift Nov 28, 2024
702337b
Define test classes as `final`
laravel-shift Nov 28, 2024
e1c9835
fix: update PHPUnit config file
Pyker Nov 28, 2024
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
16 changes: 14 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ APP_KEY=
APP_DEBUG=false
APP_URL=http://localhost

APP_TIMEZONE=UTC
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand All @@ -13,11 +22,14 @@ DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
Expand Down
13 changes: 8 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
!.env.example
!.env.testing
!docker/.env
.env
.env.*
/.phpunit.cache
/docker/mysql
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
./.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
composer.lock
npm-debug.log
yarn-error.log

composer.lock
28 changes: 0 additions & 28 deletions app/Console/Kernel.php

This file was deleted.

48 changes: 0 additions & 48 deletions app/Exceptions/Handler.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Http/Controllers/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function postCreate(): RedirectResponse
return redirect('client/create')->withErrors($validation->messages());
}

$client = new Client();
$client = new Client;
$client->name = Request::input('name');
$client->uuid = Request::input('uuid');
$client->save();
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
abstract class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/KeyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function postCreate(): RedirectResponse
return redirect('key/create')->withErrors($validation->messages());
}

$key = new Key();
$key = new Key;
$key->name = Request::input('name');
$key->api_key = Request::input('api_key');
$key->save();
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/ModController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function postCreate(): RedirectResponse
return redirect('mod/create')->withErrors($validation->messages());
}

$mod = new Mod();
$mod = new Mod;
$mod->name = Str::slug(Request::input('name'));
$mod->pretty_name = Request::input('pretty_name');
$mod->author = Request::input('author');
Expand Down Expand Up @@ -264,7 +264,7 @@ public function anyAddVersion(): JsonResponse
$pfile_md5 = ! $file_md5['success'] ? 'Null' : $file_md5['md5'];
}

$ver = new Modversion();
$ver = new Modversion;
$ver->mod_id = $mod->id;
$ver->version = $version;

Expand Down Expand Up @@ -407,12 +407,12 @@ private function remote_mod_md5($mod, $version, $location)
do {
$result = UrlUtils::get_remote_md5($URL);

if (!$result['success']) {
Log::warning('Error attempting to remote MD5 file ' . $mod->name . ' version ' . $version . ' located at ' . $URL . '.');
if (! $result['success']) {
Log::warning('Error attempting to remote MD5 file '.$mod->name.' version '.$version.' located at '.$URL.'.');
}

$attempts++;
} while ($attempts < 3 && !$result['success']);
} while ($attempts < 3 && ! $result['success']);

return $result;
}
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/ModpackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function postAddBuild($modpack_id)
}

$clone = Request::input('clone');
$build = new Build();
$build = new Build;
$build->modpack_id = $modpack->id;
$build->version = Request::input('version');

Expand Down Expand Up @@ -263,7 +263,7 @@ public function postCreate(): RedirectResponse
return redirect('modpack/create')->withErrors($validation->messages());
}

$modpack = new Modpack();
$modpack = new Modpack;
$modpack->name = Request::input('name');
$modpack->slug = Str::slug(Request::input('slug'));
$modpack->hidden = Request::input('hidden') ? false : true;
Expand Down Expand Up @@ -447,9 +447,9 @@ public function anyModify($action = null): JsonResponse
}

$duplicate = DB::table('build_modversion')
->where('build_id', '=', $build->id)
->where('modversion_id', '=', $ver->id)
->count() > 0;
->where('build_id', '=', $build->id)
->where('modversion_id', '=', $ver->id)
->count() > 0;
if ($duplicate) {
return response()->json([
'status' => 'failed',
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function postCreate(): RedirectResponse
$creator = Auth::user()->id;
$creatorIP = Request::ip();

$user = new User();
$user = new User;
$user->email = Request::input('email');
$user->username = Request::input('username');
$user->password = Hash::make(Request::input('password'));
Expand All @@ -179,7 +179,7 @@ public function postCreate(): RedirectResponse
$user->updated_by_user_id = $creator;
$user->save();

$perm = new UserPermission();
$perm = new UserPermission;
$perm->user_id = $user->id;

$perm->solder_full = Request::input('solder-full') ? true : false;
Expand Down
120 changes: 0 additions & 120 deletions app/Http/Kernel.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/Authenticate.php

This file was deleted.

Loading