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 12.x Shift #255

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=de_DE
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
Expand Down Expand Up @@ -45,7 +47,7 @@ SESSION_DOMAIN=null
#MAIL_PORT=1025
#MAIL_USERNAME=null
#MAIL_PASSWORD=null
#MAIL_ENCRYPTION=null
MAIL_SCHEME=null
#MAIL_FROM_ADDRESS="[email protected]"
#MAIL_FROM_NAME="${APP_NAME}"

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/public/build
/public/storage
/storage/*.key
/storage/pail
/vendor
.env
.env.testing
Expand All @@ -15,6 +16,7 @@ Homestead.yaml
npm-debug.log
yarn-error.log
/.idea
/.nova
/.vscode
/public/css/app.css
/public/js/app.js
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/LegacyChangeBankAccountId.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LegacyChangeBankAccountId extends Command
/**
* Execute the console command.
*/
public function handle()
public function handle(): int
{
return DB::transaction(function () {
$oldId = $this->argument('old-id');
Expand Down
10 changes: 1 addition & 9 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

abstract class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
abstract class Controller {}
2 changes: 1 addition & 1 deletion app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class Authenticate extends Middleware
{
public function handle($request, Closure $next, ...$guards): Response
public function handle(Request $request, Closure $next, ...$guards): Response
{
// do it like in the parent
$this->authenticate($request, $guards);
Expand Down
7 changes: 5 additions & 2 deletions artisan
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;

define('LARAVEL_START', microtime(true));
Expand All @@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
require __DIR__.'/vendor/autoload.php';

// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput);
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';

$status = $app->handleCommand(new ArgvInput);

exit($status);
32 changes: 19 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,43 @@
"ext-bcmath": "*",
"ext-pdo": "*",
"ext-zip": "*",
"blade-ui-kit/blade-heroicons": "^2.3",
"blade-ui-kit/blade-heroicons": "^2.6",
"defuse/php-encryption": "^2.3",
"globalcitizen/php-iban": "^4.2",
"guzzlehttp/guzzle": "^7.8",
"intervention/validation": "^4.4",
"intervention/validation": "^4.5",
"jumbojett/openid-connect-php": "^1.0",
"laravel/framework": "^11.41",
"livewire/flux": "^1.0",
"laravel/framework": "12.x-dev",
"livewire/flux": "^1.1",
"livewire/flux-pro": "^1.0",
"livewire/livewire": "^v3.5",
"maatwebsite/excel": "^3.1",
"meyfa/php-svg": "^0.11.3",
"nemiah/php-fints": "dev-master",
"open-administration/php-latex-renderer": "^1.1",
"owenvoke/blade-fontawesome": "^2.6",
"owenvoke/blade-fontawesome": "^2.9",
"propaganistas/laravel-phone": "^5.3",
"socialiteproviders/laravelpassport": "^4.3",
"spatie/laravel-backup": "^8.6",
"spatie/laravel-backup": "^9.2",
"spatie/regex": "*"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.12",
"barryvdh/laravel-ide-helper": "^3.0",
"barryvdh/laravel-debugbar": "^3.15",
"barryvdh/laravel-ide-helper": "^3.5",
"fakerphp/faker": "^1.23",
"larastan/larastan": "^2.9",
"larastan/larastan": "^3.1",
"laravel/pint": "^1.20",
"laravel/sail": "^1.26",
"laravel/tinker": "^2.9",
"laravel/sail": "^1.41",
"laravel/tinker": "^2.10.1",
"magentron/laravel-blade-lint": "^2.0",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-laravel": "^2.4",
"pestphp/pest-plugin-livewire": "^2.1",
"roave/security-advisories": "dev-latest"
"roave/security-advisories": "dev-latest",
"laravel/pail": "^1.2.2",
"phpunit/phpunit": "^11.5.3"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -75,6 +77,10 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
]
},
"extra": {
Expand Down
150 changes: 146 additions & 4 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,78 @@
<?php

use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/

'default' => env('DB_CONNECTION', 'sqlite'),

/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/

'connections' => [

'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
],

'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => env('DB_TABLE_PREFIX', ''),
'prefix_indexes' => true,
'strict' => false, // laravel suggested true
Expand Down Expand Up @@ -42,11 +101,94 @@
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],

'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],

],

/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/

'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => false, // disable to preserve original behavior for existing applications
],

/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/

'redis' => [

'client' => env('REDIS_CLIENT', 'phpredis'),

'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'persistent' => env('REDIS_PERSISTENT', false),
],

'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],

'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],

],

];
Loading
Loading