-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from shyim/modernize
- Loading branch information
Showing
14 changed files
with
3,125 additions
and
592 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,8 @@ | ||
/vendor export-ignore | ||
/.github export-ignore | ||
/tests export-ignore | ||
/.* export-ignore | ||
/composer.lock export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/README.md export-ignore |
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,56 @@ | ||
name: PHP | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [8.2, 8.3] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpunit | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse | ||
|
||
cs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHP CS Fixer | ||
run: vendor/bin/php-cs-fixer fix --dry-run --diff |
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 +1,3 @@ | ||
/vendor/ | ||
.phpunit.cache/ | ||
.php-cs-fixer.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,22 @@ | ||
<?php declare(strict_types=1); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PHP80Migration:risky' => true, | ||
'@PHP82Migration' => true, | ||
'@PhpCsFixer' => true, | ||
'@PER-CS2.0' => true, | ||
'@PER-CS2.0:risky' => true, | ||
// Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line. | ||
'blank_line_after_opening_tag' => false, | ||
// Ensure there is no code on the same line as the PHP open tag. | ||
'linebreak_after_opening_tag' => false, | ||
// We use the attribute CoversClass which is not recognized by php-cs-fixer | ||
'php_unit_test_class_requires_covers' => false, | ||
]) | ||
->setFinder(PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->in(__DIR__), | ||
) | ||
; |
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
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.