Merge pull request #6984 from pixelfed/revert-6981-laravel12-skeleton-uplift

Revert "Merge pull request #6981 from pixelfed/chore/laravel12-skelet…
pull/6986/head
Shlee 3 weeks ago committed by GitHub
commit e34304887d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,18 +1,53 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
// Register the Composer autoloader... /*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/vendor/autoload.php'; require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php'; $app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput); /*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status); exit($status);

@ -59,10 +59,12 @@
"vimeo/psalm": "^6.5" "vimeo/psalm": "^6.5"
}, },
"autoload": { "autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": { "psr-4": {
"App\\": "app/", "App\\": "app/"
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}, },
"files": [ "files": [
"app/helpers.php" "app/helpers.php"

@ -1,7 +1,39 @@
<?php <?php
use App\Util\Lexer\PrettyNumber; use App\Util\Lexer\PrettyNumber;
use Illuminate\Support\Facades\Facade; use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\Facades\Bus;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Str;
return [ return [
@ -104,30 +136,6 @@ return [
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
'short_description' => env('PF_SHORT_DESCRIPTION', 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.'), 'short_description' => env('PF_SHORT_DESCRIPTION', 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.'),
'description' => env('PF_DESCRIPTION', 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.'), 'description' => env('PF_DESCRIPTION', 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.'),
'rules' => env('PF_RULES', null), 'rules' => env('PF_RULES', null),
@ -157,8 +165,42 @@ return [
| |
*/ */
'aliases' => Facade::defaultAliases()->merge([ 'aliases' => [
'App' => App::class,
'Artisan' => Artisan::class,
'Auth' => Auth::class,
'Blade' => Blade::class,
'Broadcast' => Broadcast::class,
'Bus' => Bus::class,
'Cache' => Cache::class,
'Config' => Config::class,
'Cookie' => Cookie::class,
'Crypt' => Crypt::class,
'DB' => DB::class,
'Event' => Event::class,
'File' => File::class,
'Gate' => Gate::class,
'Hash' => Hash::class,
'Lang' => Lang::class,
'Log' => Log::class,
'Mail' => Mail::class,
'Notification' => Notification::class,
'Password' => Password::class,
'Queue' => Queue::class,
'Redirect' => Redirect::class,
'Redis' => Redis::class,
'Request' => Request::class,
'Response' => Response::class,
'Route' => Route::class,
'Schema' => Schema::class,
'Session' => Session::class,
'Storage' => Storage::class,
'URL' => URL::class,
'Validator' => Validator::class,
'View' => View::class,
'Str' => Str::class,
'PrettyNumber' => PrettyNumber::class, 'PrettyNumber' => PrettyNumber::class,
])->toArray(), ],
]; ];

@ -43,9 +43,9 @@ return [
'database' => [ 'database' => [
'driver' => 'database', 'driver' => 'database',
'table' => env('DB_CACHE_TABLE', 'cache'), 'table' => 'cache',
'connection' => env('DB_CACHE_CONNECTION'), 'connection' => null,
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'), 'lock_connection' => null,
], ],
'file' => [ 'file' => [
@ -75,7 +75,7 @@ return [
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'), 'lock_connection' => 'default',
'client' => env('REDIS_CLIENT', 'predis'), 'client' => env('REDIS_CLIENT', 'predis'),
'default' => [ 'default' => [

@ -54,9 +54,6 @@ return [
'prefix' => '', 'prefix' => '',
'strict' => env('DB_STRICT', false), 'strict' => env('DB_STRICT', false),
'engine' => null, 'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
(class_exists('Pdo\Mysql') ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
]) : [],
'dump' => [ 'dump' => [
'use_single_transaction', 'use_single_transaction',
'skip_lock_tables', 'skip_lock_tables',
@ -141,7 +138,6 @@ return [
'scheme' => env('REDIS_SCHEME', 'tcp'), 'scheme' => env('REDIS_SCHEME', 'tcp'),
'path' => env('REDIS_PATH'), 'path' => env('REDIS_PATH'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME', null),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATABASE', 0), 'database' => env('REDIS_DATABASE', 0),
@ -151,7 +147,6 @@ return [
'scheme' => env('REDIS_SCHEME', 'tcp'), 'scheme' => env('REDIS_SCHEME', 'tcp'),
'path' => env('REDIS_PATH'), 'path' => env('REDIS_PATH'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME', null),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATABASE_SESSION', 1), 'database' => env('REDIS_DATABASE_SESSION', 1),
@ -161,7 +156,6 @@ return [
'scheme' => env('REDIS_SCHEME', 'tcp'), 'scheme' => env('REDIS_SCHEME', 'tcp'),
'path' => env('REDIS_PATH'), 'path' => env('REDIS_PATH'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME', null),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATABASE_PULSE', 2), 'database' => env('REDIS_DATABASE_PULSE', 2),

@ -18,22 +18,6 @@ return [
'default' => env('LOG_CHANNEL', 'stack'), 'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Log Channels | Log Channels
@ -65,16 +49,16 @@ return [
'daily' => [ 'daily' => [
'driver' => 'daily', 'driver' => 'daily',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'), 'level' => 'debug',
'days' => env('LOG_DAILY_DAYS', 14), 'days' => 14,
], ],
'slack' => [ 'slack' => [
'driver' => 'slack', 'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'), 'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), 'username' => 'Laravel Log',
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), 'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'), 'level' => 'critical',
], ],
'stderr' => [ 'stderr' => [
@ -94,7 +78,7 @@ return [
'errorlog' => [ 'errorlog' => [
'driver' => 'errorlog', 'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => 'debug',
], ],
'null' => [ 'null' => [

@ -36,7 +36,6 @@ return [
'mailers' => [ 'mailers' => [
'smtp' => [ 'smtp' => [
'transport' => 'smtp', 'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'), 'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'), 'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525), 'port' => env('MAIL_PORT', 2525),

@ -36,57 +36,38 @@ return [
'database' => [ 'database' => [
'driver' => 'database', 'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'), 'table' => 'jobs',
'table' => env('DB_QUEUE_TABLE', 'jobs'), 'queue' => 'default',
'queue' => env('DB_QUEUE', 'default'), 'retry_after' => 90,
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
], ],
'beanstalkd' => [ 'beanstalkd' => [
'driver' => 'beanstalkd', 'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'), 'host' => 'localhost',
'queue' => env('BEANSTALKD_QUEUE', 'default'), 'queue' => 'default',
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90), 'retry_after' => 90,
'block_for' => 0,
], ],
'sqs' => [ 'sqs' => [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => env('SQS_KEY', env('AWS_ACCESS_KEY_ID', 'your-public-key')), 'key' => env('SQS_KEY', 'your-public-key'),
'secret' => env('SQS_SECRET', env('AWS_SECRET_ACCESS_KEY', 'your-secret-key')), 'secret' => env('SQS_SECRET', 'your-secret-key'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'), 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'suffix' => env('SQS_SUFFIX'), 'region' => env('SQS_REGION', 'us-east-1'),
'region' => env('SQS_REGION', env('AWS_DEFAULT_REGION', 'us-east-1')),
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), 'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'), 'queue' => 'default',
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 1800), 'retry_after' => 1800,
'block_for' => null, 'block_for' => null,
'after_commit' => true, 'after_commit' => true,
], ],
], ],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'job_batches',
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Failed Queue Jobs | Failed Queue Jobs
@ -99,7 +80,6 @@ return [
*/ */
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],

@ -31,7 +31,7 @@ return [
'lifetime' => env('SESSION_LIFETIME', 86400), 'lifetime' => env('SESSION_LIFETIME', 86400),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), 'expire_on_close' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -44,7 +44,7 @@ return [
| |
*/ */
'encrypt' => env('SESSION_ENCRYPT', false), 'encrypt' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -83,7 +83,7 @@ return [
| |
*/ */
'table' => env('SESSION_TABLE', 'sessions'), 'table' => 'sessions',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -122,7 +122,7 @@ return [
| |
*/ */
'cookie' => env('SESSION_COOKIE', 'pxfs'), 'cookie' => 'pxfs',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -135,7 +135,7 @@ return [
| |
*/ */
'path' => env('SESSION_PATH', '/'), 'path' => '/',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -174,7 +174,7 @@ return [
| |
*/ */
'http_only' => env('SESSION_HTTP_ONLY', true), 'http_only' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -189,7 +189,7 @@ return [
| |
*/ */
'same_site' => env('SESSION_SAME_SITE_COOKIES', env('SESSION_SAME_SITE', 'lax')), 'same_site' => env('SESSION_SAME_SITE_COOKIES', 'lax'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -202,6 +202,6 @@ return [
| |
*/ */
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false), 'partitioned' => false,
]; ];

@ -1,15 +1,15 @@
<?php <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
/** /**
* Seed the application's database. * Seed the application's database.
*
* @return void
*/ */
public function run(): void public function run()
{ {
// $this->call(UsersTableSeeder::class); // $this->call(UsersTableSeeder::class);
} }

@ -1,20 +1,65 @@
<?php <?php
use Illuminate\Foundation\Application; use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
/**
* Laravel - A PHP Framework For Web Artisans.
*
* @author Taylor Otwell <taylor@laravel.com>
*/
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode... if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { require __DIR__.'/../storage/framework/maintenance.php';
require $maintenance;
} }
// Register the Composer autoloader... /*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php'; require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request... /*
/** @var Application $app */ |--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php'; $app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture()); /*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
$request = Request::capture()
);
$response->send();
$kernel->terminate($request, $response);

Loading…
Cancel
Save