Skip to content

Commit

Permalink
Merge pull request #135 from Hi-Folks/features/134-laravel9
Browse files Browse the repository at this point in the history
Upgrade to Laravel 9, Tailwindcss 3 and DaisyUI 2
  • Loading branch information
roberto-butti authored Apr 13, 2022
2 parents a4e6d2d + f0a7bbc commit 0cd75d5
Show file tree
Hide file tree
Showing 22 changed files with 1,275 additions and 3,949 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-generated-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '7.4','8.0', '8.1' ]
php-versions: [ '8.0', '8.1' ]
dependency-stability: [ 'prefer-stable' ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-php81.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,4 @@ jobs:
run: |
vendor/bin/phpcs --standard=PSR12 app
- name: Execute Code Static Analysis (PSALM)
run: |
vendor/bin/psalm
2 changes: 1 addition & 1 deletion .github/workflows/codequality-wildcardbranch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.1', '8.0','7.4' ]
php-versions: [ '8.1', '8.0' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/psalm-sarif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Code Scanning - GitHub integration
on:
push:
branches:
- main
- develop
- tests/**

jobs:
laravel-tests:
Expand All @@ -14,7 +13,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0','7.4' ]
php-versions: [ '8.0' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/schedule-psalm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ name: Scheduled Psalm and security
on:
push:
branches:
- main
- develop
- features/**
- tests/**

jobs:
laravel-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-codequality-phpversions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0','7.4' ]
php-versions: [ '8.1', '8.0' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-dependency-stability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0','7.4' ]
php-versions: [ '8.1', '8.0' ]
dependency-stability: [ 'prefer-none','prefer-stable','prefer-lowest' ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0','7.4' ]
php-versions: [ '8.0' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.6.0 - WIP
- upgrade to Laravel 9 framework

## 0.5.2 - 2022-04-12
- added laravel 9 mapping for testbench, thanks to @dkemper
- improve dark/light mode
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ phpfix: ## Fix some warnings from phpcs
vendor/bin/phpcbf --standard=PSR12 app
git commit -m "Auto Fix PSR12 Style" .

allcheck: phpcs phpstan psalm test ## it performs all check (phpcs, phpstan, tests)
allcheck: phpcs phpstan test ## it performs all check (phpcs, phpstan, tests)

push: allcheck ## It performs all check and then git push on the current branch
git push origin HEAD
9 changes: 7 additions & 2 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
Expand All @@ -19,5 +19,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
2 changes: 1 addition & 1 deletion app/Models/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Configuration extends Model
use HasFactory;

/**
* @var string[]
* @var array<string, string>
*/
protected $casts = [
'configuration' => 'object',
Expand Down
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class User extends Authenticatable
/**
* The attributes that should be hidden for arrays.
*
* @var array<string>
* @var array<int, string>
*/
protected $hidden = [
'password',
Expand Down
4 changes: 4 additions & 0 deletions app/Objects/ReportExecution.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

class ReportExecution
{
/**
* @var Collection<string, mixed>
*/
private Collection $result;

private int $idx = -1;

public const LINE_TYPE_ERROR = 'error';
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AuthServiceProvider extends ServiceProvider
/**
* The policy mappings for the application.
*
* @var array<string, string>
* @var array<class-string, class-string>
*/
protected $policies = [
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
Expand Down
Loading

0 comments on commit 0cd75d5

Please sign in to comment.