Skip to content

Commit 70de737

Browse files
authored
Merge pull request #381 from wayofdev/feat/laravel-11
2 parents 774173c + 72225c6 commit 70de737

38 files changed

+767
-639
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ LOG_DEPRECATIONS_CHANNEL=null
3232
LOG_LEVEL=debug
3333

3434
DB_CONNECTION=pgsql
35-
DB_HOST=127.0.0.1
35+
DB_HOST=database
3636
DB_PORT=5432
3737
DB_DATABASE=wod
3838
DB_USERNAME=wod
3939
DB_PASSWORD=password
4040
DB_FORWARD_PORT=5444
4141

42-
CACHE_DRIVER=file
42+
CACHE_STORE=file
4343
FILESYSTEM_DISK=local
4444
QUEUE_CONNECTION=sync
4545
SESSION_DRIVER=file

.github/.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.6.0"
2+
".": "1.7.0"
33
}

.github/workflows/deploy-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ on: # yamllint disable-line rule:truthy
77

88
name: 🚀 Deploy to production
99

10+
concurrency: production
11+
1012
jobs:
1113
deployment:
12-
runs-on: "ubuntu-22.04"
14+
runs-on: ${{ matrix.os }}
1315
strategy:
1416
fail-fast: true
1517
matrix:

.github/workflows/deploy-staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on: # yamllint disable-line rule:truthy
77

88
name: 🚀 Deploy to staging
99

10+
concurrency: staging
11+
1012
jobs:
1113
deployment:
1214
runs-on: ${{ matrix.os }}

CHANGELOG.md

Lines changed: 164 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,23 @@ lint-yaml: ## Lints yaml files inside project
167167
.PHONY: lint-yaml
168168

169169
lint-php: ## Lints php files inside project using php-cs-fixer
170-
$(APP_COMPOSER) run-script cs:fix
170+
$(APP_COMPOSER) cs:fix
171171
.PHONY: lint-php
172172

173173
lint-diff: ## Shows diff of php-cs-fixer
174-
$(APP_COMPOSER) run-script cs:diff
174+
$(APP_COMPOSER) cs:diff
175175
.PHONY: lint-diff
176176

177177
lint-stan:
178-
$(APP_COMPOSER) run-script stan
178+
$(APP_COMPOSER) stan
179179
.PHONY: lint-stan
180180

181+
lint-stan-baseline: ## Runs phpstan to update its baseline
182+
$(APP_COMPOSER) stan:baseline
183+
.PHONY: lint-stan-baseline
184+
181185
lint-deps:
182-
$(APP_COMPOSER) run-script deptrac
186+
$(APP_COMPOSER) deptrac
183187
.PHONY: lint-deps
184188

185189
test: ## Run project php-unit and pest tests

app/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"test": "php vendor/bin/pest",
6464
"test:cc": "XDEBUG_MODE=coverage php vendor/bin/pest --coverage-clover coverage.xml",
6565
"stan": "php vendor/bin/phpstan analyse --memory-limit=2G",
66+
"stan:baseline": "php vendor/bin/phpstan analyse --generate-baseline --memory-limit=2G --allow-empty-baseline",
6667
"deptrac": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache",
6768
"deptrac:ci": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter github-actions",
6869
"deptrac:gv": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter graphviz-image --output ../assets/deptrac.svg"

app/composer.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/config/app.php

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
/*
1010
* Application Name
1111
*
12-
* This value is the name of your application. This value is used when the
12+
* This value is the name of your application, which will be used when the
1313
* framework needs to place the application's name in a notification or
14-
* any other location as required by the application or its packages.
15-
*
14+
* other UI elements where an application name needs to be displayed.
1615
*/
1716
'name' => env('APP_NAME', 'Laravel'),
1817

@@ -22,7 +21,6 @@
2221
* This value determines the "environment" your application is currently
2322
* running in. This may determine how you prefer to configure various
2423
* services the application utilizes. Set this in your ".env" file.
25-
*
2624
*/
2725
'env' => env('APP_ENV', 'production'),
2826

@@ -32,7 +30,6 @@
3230
* When your application is in debug mode, detailed error messages with
3331
* stack traces will be shown on every error that occurs within your
3432
* application. If disabled, a simple generic error page is shown.
35-
*
3633
*/
3734
'debug' => (bool) env('APP_DEBUG', false),
3835

@@ -41,62 +38,46 @@
4138
*
4239
* This URL is used by the console to properly generate URLs when using
4340
* the Artisan command line tool. You should set this to the root of
44-
* your application so that it is used when running Artisan tasks.
45-
*
41+
* the application so that it's available within Artisan commands.
4642
*/
4743
'url' => env('APP_URL', 'http://localhost'),
44+
'frontend_url' => env('FRONTEND_URL', 'http://localhost:3000'),
4845
'asset_url' => env('ASSET_URL'),
4946

5047
/*
5148
* Application Timezone
5249
*
5350
* Here you may specify the default timezone for your application, which
54-
* will be used by the PHP date and date-time functions. We have gone
55-
* ahead and set this to a sensible default for you out of the box.
56-
*
51+
* will be used by the PHP date and date-time functions. The timezone
52+
* is set to "UTC" by default as it is suitable for most use cases.
5753
*/
5854
'timezone' => env('APP_TIMEZONE', 'UTC'),
5955

6056
/*
6157
* Application Locale Configuration
6258
*
6359
* The application locale determines the default locale that will be used
64-
* by the translation service provider. You are free to set this value
65-
* to any of the locales which will be supported by the application.
66-
*
67-
*/
68-
'locale' => 'en',
69-
70-
/*
71-
* Application Fallback Locale
72-
*
73-
* The fallback locale determines the locale to use when the current one
74-
* is not available. You may change the value to correspond to any of
75-
* the language folders that are provided through your application.
76-
*
60+
* by Laravel's translation / localization methods. This option can be
61+
* set to any locale for which you plan to have translation strings.
7762
*/
78-
'fallback_locale' => 'en',
79-
80-
/*
81-
* Faker Locale
82-
*
83-
* This locale will be used by the Faker PHP library when generating fake
84-
* data for your database seeds. For example, this will be used to get
85-
* localized telephone numbers, street address information and more.
86-
*
87-
*/
88-
'faker_locale' => 'en_US',
63+
'locale' => env('APP_LOCALE', 'en'),
64+
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
65+
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
8966

9067
/*
9168
* Encryption Key
9269
*
93-
* This key is used by the Illuminate encrypter service and should be set
94-
* to a random, 32 character string, otherwise these encrypted strings
95-
* will not be safe. Please do this before deploying an application!
96-
*
70+
* This key is utilized by Laravel's encryption services and should be set
71+
* to a random, 32 character string to ensure that all encrypted values
72+
* are secure. You should do this prior to deploying the application.
9773
*/
98-
'key' => env('APP_KEY'),
9974
'cipher' => 'AES-256-CBC',
75+
'key' => env('APP_KEY'),
76+
'previous_keys' => [
77+
...array_filter(
78+
explode(',', env('APP_PREVIOUS_KEYS', ''))
79+
),
80+
],
10081

10182
/*
10283
* Maintenance Mode Driver
@@ -106,11 +87,10 @@
10687
* allow maintenance mode to be controlled across multiple machines.
10788
*
10889
* Supported drivers: "file", "cache"
109-
*
11090
*/
11191
'maintenance' => [
112-
'driver' => 'file',
113-
// 'store' => 'redis',
92+
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
93+
'store' => env('APP_MAINTENANCE_STORE', 'database'),
11494
],
11595

11696
/*
@@ -119,7 +99,6 @@
11999
* The service providers listed here will be automatically loaded on the
120100
* request to your application. Feel free to add your own services to
121101
* this array to grant expanded functionality to your applications.
122-
*
123102
*/
124103
'providers' => ServiceProvider::defaultProviders()->merge([
125104
/*

app/config/auth.php

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66
/*
77
* Authentication Defaults
88
*
9-
* This option controls the default authentication "guard" and password
10-
* reset options for your application. You may change these defaults
9+
* This option defines the default authentication "guard" and password
10+
* reset "broker" for your application. You may change these values
1111
* as required, but they're a perfect start for most applications.
1212
*/
1313
'defaults' => [
14-
'guard' => 'web',
15-
'passwords' => 'users',
14+
'guard' => env('AUTH_GUARD', 'web'),
15+
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
1616
],
1717

1818
/*
1919
* Authentication Guards
2020
*
2121
* Next, you may define every authentication guard for your application.
2222
* Of course, a great default configuration has been defined for you
23-
* here which uses session storage and the Eloquent user provider.
23+
* which utilizes session storage plus the Eloquent user provider.
2424
*
25-
* All authentication drivers have a user provider. This defines how the
25+
* All authentication guards have a user provider, which defines how the
2626
* users are actually retrieved out of your database or other storage
27-
* mechanisms used by this application to persist your user's data.
27+
* system used by the application. Typically, Eloquent is utilized.
2828
*
2929
* Supported: "session"
30-
*
3130
*/
3231
'guards' => [
3332
'web' => [
@@ -39,21 +38,20 @@
3938
/*
4039
* User Providers
4140
*
42-
* All authentication drivers have a user provider. This defines how the
41+
* All authentication guards have a user provider, which defines how the
4342
* users are actually retrieved out of your database or other storage
44-
* mechanisms used by this application to persist your user's data.
43+
* system used by the application. Typically, Eloquent is utilized.
4544
*
4645
* If you have multiple user tables or models you may configure multiple
47-
* sources which represent each model / table. These sources may then
46+
* providers to represent the model / table. These providers may then
4847
* be assigned to any extra authentication guards you have defined.
4948
*
5049
* Supported: "database", "eloquent"
51-
*
5250
*/
5351
'providers' => [
5452
'users' => [
5553
'driver' => 'eloquent',
56-
'model' => Domain\User\Models\User::class,
54+
'model' => env('AUTH_MODEL', Domain\User\Models\User::class),
5755
],
5856

5957
// 'users' => [
@@ -65,9 +63,9 @@
6563
/*
6664
* Resetting Passwords
6765
*
68-
* You may specify multiple password reset configurations if you have more
69-
* than one user table or model in the application, and you want to have
70-
* separate password reset settings based on the specific user types.
66+
* These configuration options specify the behavior of Laravel's password
67+
* reset functionality, including the table utilized for token storage
68+
* and the user provider that is invoked to actually retrieve users.
7169
*
7270
* The expiry time is the number of minutes that each reset token will be
7371
* considered valid. This security feature keeps tokens short-lived so
@@ -76,12 +74,11 @@
7674
* The throttle setting is the number of seconds a user must wait before
7775
* generating more password reset tokens. This prevents the user from
7876
* quickly generating a very large amount of password reset tokens.
79-
*
8077
*/
8178
'passwords' => [
8279
'users' => [
8380
'provider' => 'users',
84-
'table' => 'password_reset_tokens',
81+
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
8582
'expire' => 60,
8683
'throttle' => 60,
8784
],
@@ -91,9 +88,8 @@
9188
* Password Confirmation Timeout
9289
*
9390
* Here you may define the amount of seconds before a password confirmation
94-
* times out and the user is prompted to re-enter their password via the
91+
* window expires and users are asked to re-enter their password via the
9592
* confirmation screen. By default, the timeout lasts for three hours.
96-
*
9793
*/
98-
'password_timeout' => 10800,
94+
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
9995
];

0 commit comments

Comments
 (0)