-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
24 changed files
with
9,377 additions
and
633 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM robsontenorio/laravel | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/ubuntu | ||
{ | ||
"name": "Laravel Keycloak Guard", | ||
"remoteUser": "appuser", | ||
"workspaceFolder": "/var/www/app", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/var/www/app,type=bind", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"[php]": { | ||
"editor.defaultFormatter": "junstyle.php-cs-fixer", | ||
"editor.formatOnSave": true | ||
}, | ||
"php-cs-fixer.executablePath": "/var/www/app/vendor/bin/php-cs-fixer", | ||
"php-cs-fixer.config": "/var/www/app/.php-cs-fixer.php", | ||
"php-cs-fixer.onsave": true | ||
}, | ||
"remoteEnv": { | ||
"PHP_CS_FIXER_IGNORE_ENV": "1" | ||
}, | ||
"extensions": [ | ||
"bmewburn.vscode-intelephense-client", | ||
"junstyle.php-cs-fixer" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Test package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [8.0, 8.1] | ||
laravel: [8.*, 9.*] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- laravel: 8.* | ||
testbench: 6.* | ||
collision: 5.* | ||
- laravel: 9.* | ||
testbench: 7.* | ||
collision: 6.* | ||
exclude: | ||
- laravel: 8.* | ||
stability: prefer-lowest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update --ansi | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ansi | ||
- name: Execute tests | ||
run: composer test:coverage | ||
|
||
- name: Upload to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODE_COV_TOKEN }} | ||
files: .coverage/clover.xml | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
build | ||
composer.lock | ||
docs | ||
vendor | ||
.php_cs.cache | ||
coverage | ||
.phpunit.result.cache | ||
docker-compose.yml | ||
.php-cs-fixer.cache | ||
.coverage/ | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$rules = [ | ||
'@PSR12' => true, | ||
'no_unused_imports' => true, | ||
'braces' => true, | ||
'array_indentation' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
'binary_operator_spaces' => true, | ||
'no_extra_blank_lines' => true, | ||
'method_chaining_indentation' => true, | ||
'concat_space' => [ | ||
'spacing' => 'none', | ||
], | ||
'ordered_imports' => [ | ||
'sort_algorithm' => | ||
'alpha', | ||
], | ||
'class_attributes_separation' => [ | ||
'elements' => [ | ||
'method' => 'one', | ||
], | ||
], | ||
'blank_line_before_statement' => [ | ||
'statements' => [ | ||
'if', | ||
'break', | ||
'continue', | ||
'return', | ||
'throw', | ||
'try' | ||
], | ||
], | ||
]; | ||
|
||
$finder = Finder::create() | ||
->in([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/config', | ||
__DIR__ . '/tests', | ||
]) | ||
->name('*.php') | ||
->notName('*.blade.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true) | ||
; | ||
|
||
return (new Config()) | ||
->setFinder($finder) | ||
->setRules($rules) | ||
->setRiskyAllowed(true) | ||
->setUsingCache(true); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.