forked from thephpleague/flysystem-cached-adapter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate phpcsfixer for development (#27)
- Loading branch information
Showing
23 changed files
with
119 additions
and
95 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 |
---|---|---|
|
@@ -68,3 +68,36 @@ jobs: | |
|
||
- name: Run unit tests | ||
run: docker exec mycontainer vendor/bin/phpunit | ||
|
||
job3: | ||
strategy: | ||
matrix: | ||
php_version: ["8.1"] | ||
name: PhpCsFixer code style checker ${{ matrix.php_version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Enable caching | ||
uses: satackey/[email protected] | ||
# Deprecation warnings are expected... | ||
continue-on-error: true | ||
|
||
- name: Build image | ||
run: docker image build . -f Dockerfile -t myimage:latest --build-arg PHP_VERSION=${{ matrix.php_version }} | ||
|
||
- name: Launch container | ||
run: docker run -d -v "$(pwd)/:/app" --name mycontainer myimage:latest tail -f /dev/null | ||
|
||
- name: Check PHP version | ||
run: docker exec mycontainer php -v | ||
|
||
- name: Check composer.json validity | ||
run: docker exec mycontainer composer validate | ||
|
||
- name: Install dependencies | ||
run: docker exec mycontainer composer install | ||
|
||
- name: Run unit tests | ||
run: docker exec mycontainer vendor/friendsofphp/php-cs-fixer/php-cs-fixer check |
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,4 +1,6 @@ | ||
composer.lock | ||
vendor | ||
.phpunit.cache | ||
.env | ||
/composer.lock | ||
/vendor | ||
/.phpunit.cache | ||
/.php-cs-fixer.cache | ||
|
||
.env |
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,17 @@ | ||
<?php | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$finder = (new Finder()) | ||
->ignoreDotFiles(false) | ||
->ignoreVCSIgnored(true) | ||
->in(__DIR__); | ||
|
||
return (new Config()) | ||
->setRules([ | ||
'@PSR12' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'new_with_parentheses' => false, | ||
]) | ||
->setFinder($finder); |
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
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
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
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
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
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.