Skip to content

Commit

Permalink
chore: upgrade laravel from v10 to v11
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jun 10, 2024
1 parent b6b3ee3 commit a25513f
Show file tree
Hide file tree
Showing 53 changed files with 2,494 additions and 4,684 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1
- uses: extractions/setup-just@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
Expand All @@ -22,13 +22,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1
- uses: extractions/setup-just@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- uses: actions/setup-node@v3
with:
node-version: '20'
node-version: '22'
- name: Lint project
run: |
cd src
Expand All @@ -37,10 +37,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
phpversion: ['8.1', '8.2', '8.3']
phpversion: ['8.2', '8.3']
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1
- uses: extractions/setup-just@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpversion }}
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- uses: extractions/setup-just@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v3.0.0 (2024-06-10)

- Upgrades Laravel from v10 to v11
- Drops support for PHP 8.1
- Bumps all dependencies

## v2.1.0 (2023-11-28)

- Adds PHP 8.3 support
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM justintime50/nginx-php:8.3-18
FROM justintime50/nginx-php:8.3-19

ARG PROD

Expand All @@ -9,15 +9,12 @@ RUN if [ ! -z "$PROD" ]; then \
composer install -q --no-ansi --no-interaction --no-scripts --no-plugins --no-progress --prefer-dist --optimize-autoloader --no-dev \
&& npm install -s --omit=dev \
&& npm run build \
&& php artisan config:cache \
&& php artisan route:cache \
&& php artisan view:cache; \
&& php artisan optimize; \
# Setup dev env
else \
composer install \
&& npm install \
&& php artisan optimize:clear; \
fi \
# Setup shared env
&& chmod -R 755 storage bootstrap/cache \
&& php artisan storage:link
4 changes: 2 additions & 2 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ services:
replicas: 2
mem_limit: '512m'
healthcheck:
test: ['CMD', 'curl', '--silent', '--output', '/dev/null', '--show-error', '--fail', 'http://localhost']
test: ['CMD', 'curl', '--silent', '--output', '/dev/null', '--show-error', '--fail', 'http://localhost/up']
start_period: 10s
start_interval: 1s
interval: 30s
timeout: 10s
retries: 3
labels:
- 'traefik.http.routers.glass.rule=Host(`blog.justinpaulhammond.com`, `www.blog.justinpaulhammond.com`)'
- 'traefik.http.routers.glass.rule=Host(`blog.justinpaulhammond.com`) || Host(`www.blog.justinpaulhammond.com`)'
- 'traefik.http.routers.glass.tls=true'
- 'traefik.http.routers.glass.tls.certresolver=letsencrypt'
depends_on:
Expand Down
48 changes: 34 additions & 14 deletions src/.env-example
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
APP_NAME=Glass
APP_NAME="Glass"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://glass.localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=daily
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_CONNECTION=mariadb
DB_HOST=glass-db
DB_PORT=3306
DB_DATABASE=glass
DB_USERNAME=glass
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=null
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"

NOCAPTCHA_SECRET=
NOCAPTCHA_SITEKEY=
Expand Down
42 changes: 0 additions & 42 deletions src/app/Console/Kernel.php

This file was deleted.

55 changes: 0 additions & 55 deletions src/app/Exceptions/Handler.php

This file was deleted.

6 changes: 2 additions & 4 deletions src/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use AuthorizesRequests;
use DispatchesJobs;
use ValidatesRequests;
}
82 changes: 0 additions & 82 deletions src/app/Http/Kernel.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/Http/Middleware/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Closure;
use Illuminate\Http\Request;
use Auth;
use Illuminate\Support\Facades\Auth;

class Admin
{
Expand All @@ -15,7 +15,7 @@ class Admin
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
public function handle(Request $request, Closure $next)
{
if (!request()->user() || Auth::user()->role != 1) {
session()->flash('error', 'Access denied.');
Expand Down
Loading

0 comments on commit a25513f

Please sign in to comment.