Skip to content

Commit

Permalink
Merge pull request #158 from Hi-Folks/upgrade/laravel11
Browse files Browse the repository at this point in the history
Upgrading to Laravel 11
  • Loading branch information
roberto-butti authored Mar 17, 2024
2 parents c1a76f6 + 7001519 commit 1a86e3e
Show file tree
Hide file tree
Showing 112 changed files with 6,884 additions and 12,830 deletions.
10 changes: 5 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.blade.php]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
63 changes: 39 additions & 24 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
APP_NAME=LaravelGitHubActionsYamlGenerator
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
APP_TIMEZONE=UTC
APP_URL=http://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=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

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=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

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

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_ADDRESS="[email protected]"
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

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
14 changes: 10 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
55 changes: 11 additions & 44 deletions .github/workflows/check-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,30 @@ on:
- develop
- features/**
- feature/**
- upgrade/**

jobs:
laravel-tests:
runs-on: ubuntu-latest
# Service container Mysql mysql
services:
# Label used to access the service container
mysql:
# Docker Hub image (also with version)
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: db_test_laravel
## map the "external" 33306 port with the "internal" 3306
ports:
- 33306:3306
# Set health checks to wait until mysql database has started (it takes some seconds to start)
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3

strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
php-versions: [ '8.1', '8.2' ]
php-versions: [ '8.2', '8.3' ]
exclude:
- operating-system: windows-latest
php-versions: 8.1
php-versions: 8.2

name: PHP ${{ matrix.php-versions }} - OS ${{ matrix.operating-system}}

steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install NPM packages
run: npm ci
- uses: actions/checkout@v4
- name: Setup Bun js for building frontend
uses: oven-sh/setup-bun@v1
- name: Install JS packages
run: bun install
- name: Build frontend
run: npm run build
run: bun run build
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
Expand All @@ -65,29 +46,15 @@ jobs:
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Run Migrations
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: 33306
DB_USER: root

run: php artisan migrate

- name: Show dir
run: pwd
- name: PHP Version
run: php --version

# Code quality
- name: Execute tests (Unit and Feature tests) via PHPUnit
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: 33306
DB_USER: root
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"

run: composer test

Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/schedule-psalm.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public/mix-manifest.json
/Makefile.param.prod
/public/google*.html


/output/
/.vscode/
result.sarif
Expand Down
13 changes: 0 additions & 13 deletions .styleci.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

# Changelog

## 1.0.0 - 2024-03-17
- Upgrading to Laravel v11
- Upgrading to PestPHP v2
- Upgrading to Livewire v3
- Upgrading to Larastan v2


## 0.7.1 - 2023-05-07
- Switching from Webpack to Vite
- Updating node version for auto-generate command
Expand Down
21 changes: 0 additions & 21 deletions LICENSE.md

This file was deleted.

2 changes: 1 addition & 1 deletion app/Console/Commands/GenerateWorkflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function handle()
$generator->stepNodejs = true;
$generator->stepNodejsVersion = '18.x';
$versionFromNvmrc = $generator->readNvmrc($guesserFiles
->getNvmrcPath());
->getNvmrcPath());
if ($versionFromNvmrc !== '') {
$generator->stepNodejsVersion = $versionFromNvmrc;
}
Expand Down
40 changes: 0 additions & 40 deletions app/Console/Kernel.php

This file was deleted.

Loading

0 comments on commit 1a86e3e

Please sign in to comment.