Skip to content

Commit 72225c6

Browse files
committed
feat: laravel-11.x updates
1 parent 128be93 commit 72225c6

20 files changed

+316
-297
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ 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

.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 }}

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/database/migrations/2014_10_12_000000_create_users_table.php renamed to app/database/migrations/0001_01_01_000000_create_users_table.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ public function up(): void
3232
$table->json('updated_by')->nullable();
3333
$table->json('deleted_by')->nullable();
3434
});
35+
36+
Schema::create('password_reset_tokens', function (Blueprint $table): void {
37+
$table->string('email')->primary();
38+
$table->string('token');
39+
$table->timestamp('created_at')->nullable();
40+
});
41+
42+
Schema::create('sessions', function (Blueprint $table): void {
43+
$table->string('id')->primary();
44+
$table->foreignId('user_id')->nullable()->index();
45+
$table->string('ip_address', 45)->nullable();
46+
$table->text('user_agent')->nullable();
47+
$table->longText('payload');
48+
$table->integer('last_activity')->index();
49+
});
3550
}
3651

3752
/**
@@ -40,5 +55,7 @@ public function up(): void
4055
public function down(): void
4156
{
4257
Schema::dropIfExists('users');
58+
Schema::dropIfExists('password_reset_tokens');
59+
Schema::dropIfExists('sessions');
4360
}
4461
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Illuminate\Database\Migrations\Migration;
6+
use Illuminate\Database\Schema\Blueprint;
7+
use Illuminate\Support\Facades\Schema;
8+
9+
return new class() extends Migration {
10+
/**
11+
* Run the migrations.
12+
*/
13+
public function up(): void
14+
{
15+
Schema::create('cache', function (Blueprint $table): void {
16+
$table->string('key')->primary();
17+
$table->mediumText('value');
18+
$table->integer('expiration');
19+
});
20+
21+
Schema::create('cache_locks', function (Blueprint $table): void {
22+
$table->string('key')->primary();
23+
$table->string('owner');
24+
$table->integer('expiration');
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*/
31+
public function down(): void
32+
{
33+
Schema::dropIfExists('cache');
34+
Schema::dropIfExists('cache_locks');
35+
}
36+
};
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Illuminate\Database\Migrations\Migration;
6+
use Illuminate\Database\Schema\Blueprint;
7+
use Illuminate\Support\Facades\Schema;
8+
9+
return new class() extends Migration {
10+
/**
11+
* Run the migrations.
12+
*/
13+
public function up(): void
14+
{
15+
Schema::create('jobs', function (Blueprint $table): void {
16+
$table->id();
17+
$table->string('queue')->index();
18+
$table->longText('payload');
19+
$table->unsignedTinyInteger('attempts');
20+
$table->unsignedInteger('reserved_at')->nullable();
21+
$table->unsignedInteger('available_at');
22+
$table->unsignedInteger('created_at');
23+
});
24+
25+
Schema::create('job_batches', function (Blueprint $table): void {
26+
$table->string('id')->primary();
27+
$table->string('name');
28+
$table->integer('total_jobs');
29+
$table->integer('pending_jobs');
30+
$table->integer('failed_jobs');
31+
$table->longText('failed_job_ids');
32+
$table->mediumText('options')->nullable();
33+
$table->integer('cancelled_at')->nullable();
34+
$table->integer('created_at');
35+
$table->integer('finished_at')->nullable();
36+
});
37+
38+
Schema::create('failed_jobs', function (Blueprint $table): void {
39+
$table->id();
40+
$table->string('uuid')->unique();
41+
$table->text('connection');
42+
$table->text('queue');
43+
$table->longText('payload');
44+
$table->longText('exception');
45+
$table->timestamp('failed_at')->useCurrent();
46+
});
47+
}
48+
49+
/**
50+
* Reverse the migrations.
51+
*/
52+
public function down(): void
53+
{
54+
Schema::dropIfExists('jobs');
55+
Schema::dropIfExists('job_batches');
56+
Schema::dropIfExists('failed_jobs');
57+
}
58+
};

app/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)