Skip to content

Commit

Permalink
🎉 Laravel 11 (#370)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: QWp6t <hi@qwp6t.me>
  • Loading branch information
Log1x and QWp6t committed Apr 2, 2024
1 parent 659e410 commit a6c14b2
Show file tree
Hide file tree
Showing 109 changed files with 5,227 additions and 1,601 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
php: ['8.1', '8.2']
php: ['8.2']

steps:
- name: Checkout the project
Expand Down
4 changes: 2 additions & 2 deletions bin/acorn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php

(static function () {
if (! is_file($autoloadPath = dirname(__DIR__, 4) . '/vendor/autoload.php')) {
if (!is_file($autoloadPath = dirname(__DIR__, 4) . '/vendor/autoload.php')) {
$autoloadPath = dirname(__DIR__) . '/vendor/autoload.php';
}

Expand All @@ -22,5 +22,5 @@

require_once "{$rootPath}/{$composer['extra']['wordpress-install-dir']}/wp-blog-header.php";

Roots\Acorn\Bootloader::getInstance()->boot();
Roots\Acorn\Application::configure()->boot();
})();
54 changes: 27 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,46 +42,46 @@
}
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.8",
"illuminate/cache": "^10.43",
"illuminate/config": "^10.43",
"illuminate/console": "^10.43",
"illuminate/container": "^10.43",
"illuminate/contracts": "^10.43",
"illuminate/database": "^10.43",
"illuminate/encryption": "^10.43",
"illuminate/events": "^10.43",
"illuminate/filesystem": "^10.43",
"illuminate/http": "^10.43",
"illuminate/log": "^10.43",
"illuminate/queue": "^10.43",
"illuminate/routing": "^10.43",
"illuminate/support": "^10.43",
"illuminate/validation": "^10.43",
"illuminate/view": "^10.43",
"laravel/prompts": "^0.1.7",
"illuminate/cache": "^11.0",
"illuminate/config": "^11.0",
"illuminate/console": "^11.0",
"illuminate/container": "^11.0",
"illuminate/contracts": "^11.0",
"illuminate/database": "^11.0",
"illuminate/encryption": "^11.0",
"illuminate/events": "^11.0",
"illuminate/filesystem": "^11.0",
"illuminate/http": "^11.0",
"illuminate/log": "^11.0",
"illuminate/queue": "^11.0",
"illuminate/routing": "^11.0",
"illuminate/support": "^11.0",
"illuminate/validation": "^11.0",
"illuminate/view": "^11.0",
"laravel/prompts": "^0.1.17",
"laravel/serializable-closure": "^1.3",
"league/flysystem": "^3.8",
"league/flysystem": "^3.26",
"ramsey/uuid": "^4.7",
"roots/support": "^1.0",
"symfony/error-handler": "^6.2",
"symfony/var-dumper": "^6.2",
"vlucas/phpdotenv": "^5.4.1"
"symfony/error-handler": "^7.0",
"symfony/var-dumper": "^7.0",
"vlucas/phpdotenv": "^5.6"
},
"require-dev": {
"laravel/pint": "1.14",
"laravel/pint": "^1.15",
"mockery/mockery": "^1.6",
"pestphp/pest": "^2.25",
"pestphp/pest": "^2.34",
"phpcompatibility/php-compatibility": "^9.3",
"roave/security-advisories": "dev-master",
"spatie/laravel-ignition": "^2.1",
"spatie/laravel-ignition": "^2.5",
"spatie/pest-plugin-snapshots": "^2.1",
"spatie/temporary-directory": "^2.0",
"spatie/temporary-directory": "^2.2",
"tmarsteel/mockery-callable-mock": "^2.1",
"wp-cli/wp-cli": "^2.5"
"wp-cli/wp-cli": "^2.10"
},
"suggest": {
"roots/acorn-prettify": "A collection of modules to apply theme-agnostic front-end modifications (^1.0).",
Expand Down
126 changes: 126 additions & 0 deletions config-stubs/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/

'name' => env('APP_NAME', 'Acorn'),

/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/

'env' => defined('WP_ENV') ? WP_ENV : env('WP_ENV', 'production'),

/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/

'debug' => WP_DEBUG && WP_DEBUG_DISPLAY,

/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/

'url' => env('APP_URL', home_url()),

/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/

'timezone' => get_option('timezone_string') ?: env('APP_TIMEZONE', 'UTC'),

/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/

'locale' => env('APP_LOCALE', get_locale()),

'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/

'cipher' => 'AES-256-CBC',

'key' => env('APP_KEY'),

'previous_keys' => [
...array_filter(
explode(',', 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'),
],

];
70 changes: 38 additions & 32 deletions config/app.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
| other UI elements where an application name needs to be displayed.
|
*/

Expand Down Expand Up @@ -53,12 +53,14 @@
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
| the application so that it's available within Artisan commands.
|
*/

'url' => env('APP_URL', home_url()),

'frontend_url' => env('FRONTEND_URL', 'http://localhost:3000'),

'asset_url' => env('ASSET_URL'),

/*
Expand All @@ -67,38 +69,38 @@
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/

'timezone' => get_option('timezone_string') ?: 'UTC',
'timezone' => get_option('timezone_string') ?: env('APP_TIMEZONE', 'UTC'),

/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/

'locale' => get_locale(),
'locale' => env('APP_LOCALE', get_locale()),

/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| The fallback locale determines the locale to use when the default one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
| the languages which are currently supported by your application.
|
*/

'fallback_locale' => 'en',
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

/*
|--------------------------------------------------------------------------
Expand All @@ -111,22 +113,28 @@
|
*/

'faker_locale' => 'en_US',
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/

'cipher' => 'AES-256-CBC',

'key' => env('APP_KEY'),

'cipher' => 'AES-256-CBC',
'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],

/*
|--------------------------------------------------------------------------
Expand All @@ -142,30 +150,28 @@
*/

'maintenance' => [
'driver' => 'file',
// 'store' => 'redis',
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
| The service providers listed here will be automatically loaded on any
| requests to your application. You may add your own services to the
| arrays below to provide additional features to this application.
|
*/

'providers' => ServiceProvider::defaultProviders()->merge([
/*
* Package Service Providers...
*/

/*
* Application Service Providers...
*/
// App\Providers\ThemeServiceProvider::class,
// Package Service Providers...
])->merge([
// Application Service Providers...
// App\Providers\AppServiceProvider::class,
])->merge([
// Added Service Providers (Do not remove this line)...
])->toArray(),

/*
Expand All @@ -174,8 +180,8 @@
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
| is started. You may add any additional class aliases which should
| be loaded to the array. For speed, all aliases are lazy loaded.
|
*/

Expand Down

0 comments on commit a6c14b2

Please sign in to comment.