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 7.x #55

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
}
},
"require": {
"php": "^7.2",
"illuminate/cache": "^6.8",
"illuminate/config": "^6.8",
"illuminate/console": "^6.8",
"illuminate/container": "^6.8",
"illuminate/contracts": "^6.8",
"illuminate/events": "^6.8",
"illuminate/filesystem": "^6.8",
"illuminate/log": "^6.8",
"illuminate/support": "^6.8",
"illuminate/view": "^6.8",
"php": "^7.2.5",
"illuminate/cache": "^7.0",
"illuminate/config": "^7.0",
"illuminate/console": "^7.0",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
"illuminate/events": "^7.0",
"illuminate/filesystem": "^7.0",
"illuminate/log": "^7.0",
"illuminate/support": "^7.0",
"illuminate/view": "^7.0",
"league/flysystem": "^1.0",
"roots/support": "dev-master",
"symfony/var-dumper": "^5.0"
Expand Down
16 changes: 13 additions & 3 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
|
*/

'preflight' => false,
'preflight' => env('WP_ENV', 'production') !== 'production',

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -120,13 +120,20 @@
*/

'providers' => [
/**
* Package Service Providers
*/
// ExamplePackage\Providers\ExamplePackageServiceProvider::class,

/**
* Application Service Providers
*/
// App\Providers\AppServiceProvider::class,
// App\SomeService\SomeServiceServiceProvider::class,
],

/*
|--------------------------------------------------------------------------
| Class Aliases (formerly "Facades")
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
Expand All @@ -137,6 +144,7 @@

'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
Expand All @@ -152,6 +160,7 @@
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
Expand All @@ -166,6 +175,7 @@
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
Expand Down
6 changes: 3 additions & 3 deletions config/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'strategy' => 'relative',
'path' => get_theme_file_path('/dist'),
'uri' => get_theme_file_uri('/dist'),
'manifest' => get_theme_file_path('/dist/assets.json'),
],
],
'manifest' => get_theme_file_path('/dist/mix-manifest.json'),
]
]
];
5 changes: 3 additions & 2 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@

'array' => [
'driver' => 'array',
'serialize' => false,
],

'database' => [
'driver' => 'mysql',
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
Expand Down Expand Up @@ -87,7 +88,6 @@
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],

],

/*
Expand All @@ -102,4 +102,5 @@
*/

'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', wp_get_theme()->get('Name')), '_') . '_cache'),

];
98 changes: 87 additions & 11 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use function Roots\env;
use Illuminate\Support\Str;

return [

Expand All @@ -24,30 +24,70 @@
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Acorn is shown below to make development simple.
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Acorn is done through the PHP PDO facilities
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/

'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],

'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', defined('DB_HOST') ? DB_HOST : 'localhost'),
'port' => env('DB_PORT', defined('DB_PORT') ? DB_PORT : '3306'),
'database' => env('DB_NAME', defined('DB_NAME') ? DB_NAME : 'wordpress'),
'username' => env('DB_USER', defined('DB_USER') ? DB_USER : 'wordpress'),
'password' => env('DB_PASSWORD', defined('DB_PASSWORD') ? DB_PASSWORD : ''),
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', defined('DB_CHARSET') ? DB_CHARSET : 'utf8mb4'),
'collation' => env('DB_COLLATE', defined('DB_COLLATE') ? DB_COLLATE : 'utf8mb4_unicode_ci'),
'prefix' => env('DB_PREFIX', $GLOBALS['table_prefix'] ?? 'wp_'),
'charset' => 'utf8mb4',
'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'),
]) : [],
],

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

'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
],

Expand All @@ -63,4 +103,40 @@
*/

'migrations' => 'migrations',

/*
|--------------------------------------------------------------------------
| 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 APC or Memcached. Laravel makes it easy to dig right in.
|
*/

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

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

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

'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];
15 changes: 4 additions & 11 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used.
| The "local" disk, as well as a variety of cloud-based disks are
| available to your application. Just store away!
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/

Expand Down Expand Up @@ -39,7 +39,7 @@
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/

Expand All @@ -58,13 +58,6 @@
'visibility' => 'public',
],

'theme' => [
'driver' => 'local',
'root' => STYLESHEETPATH,
'url' => get_stylesheet_directory_uri(),
'visibility' => 'public',
],

's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
Expand Down
54 changes: 54 additions & 0 deletions config/hashing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

use function Roots\env;

return [

/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/

'driver' => 'bcrypt',

/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/

'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],

/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/

'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],

];
16 changes: 13 additions & 3 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

Expand Down Expand Up @@ -27,7 +28,7 @@
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Acorn uses the Monolog PHP logging library. This gives
| the box, the framework uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
Expand All @@ -39,7 +40,7 @@
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'channels' => ['single'],
'ignore_exceptions' => false,
],

Expand All @@ -59,7 +60,7 @@
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Sage Log',
'username' => 'App Log',
'emoji' => ':boom:',
'level' => 'critical',
],
Expand Down Expand Up @@ -92,5 +93,14 @@
'driver' => 'errorlog',
'level' => 'debug',
],

'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],

'emergency' => [
'path' => storage_path('logs/app.log'),
],
],
];
Loading