-
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.
Merge pull request #14 from Setono/upgrade
Upgrade library
- Loading branch information
Showing
21 changed files
with
286 additions
and
178 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 |
---|---|---|
@@ -1,42 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
[*.neon] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[composer.json] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[phpstan.neon] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[phpunit.xml{,.dist}] | ||
indent_style = space | ||
indent_size = 4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,192 @@ | ||
name: build | ||
name: "build" | ||
on: | ||
push: ~ | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: ~ | ||
schedule: | ||
- cron: 5 8 * * 2 | ||
workflow_dispatch: ~ | ||
|
||
jobs: | ||
checks: | ||
name: 'PHP ${{ matrix.php-versions }} with composer args: ${{ matrix.composer-args }}' | ||
runs-on: ${{ matrix.operating-system }} | ||
coding-standards: | ||
name: "Coding Standards" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['7.3', '7.4'] | ||
composer-args: ['--prefer-lowest --prefer-stable', ''] | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring | ||
coverage: none | ||
tools: composer-require-checker, composer-unused | ||
- name: Install Composer dependencies | ||
run: composer update --no-progress --no-suggest --prefer-dist --no-interaction ${{ matrix.composer-args }} | ||
- name: Validate composer | ||
run: composer validate --strict | ||
- name: Check composer normalized | ||
run: composer normalize --dry-run | ||
- name: Check style | ||
run: composer check-style | ||
- name: Static analysis | ||
run: composer analyse | ||
- name: Run phpunit | ||
run: composer phpunit | ||
- name: Composer require checker | ||
run: composer-require-checker | ||
- name: Composer unused checker | ||
run: composer-unused | ||
- name: Upload coverage | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Validate composer" | ||
run: "composer validate --strict" | ||
|
||
- name: "Check composer normalized" | ||
run: "composer normalize --dry-run" | ||
|
||
- name: "Check style" | ||
run: "composer check-style" | ||
|
||
dependency-analysis: | ||
name: "Dependency Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "composer-require-checker, composer-unused" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run maglnet/composer-require-checker" | ||
run: "composer-require-checker check" | ||
|
||
- name: "Run composer-unused/composer-unused" | ||
run: "composer-unused" | ||
|
||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Static analysis" | ||
run: "composer analyse" | ||
|
||
unit-tests: | ||
name: "Unit tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run phpunit" | ||
run: "composer phpunit" | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.1" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for phpunit/phpunit" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Collect code coverage with pcov and phpunit/phpunit" | ||
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml" | ||
|
||
- name: "Send code coverage report to Codecov.io" | ||
env: | ||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | ||
run: "bash <(curl -s https://codecov.io/bash)" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use ComposerUnused\ComposerUnused\Configuration\Configuration; | ||
use ComposerUnused\ComposerUnused\Configuration\NamedFilter; | ||
|
||
return static function (Configuration $config): Configuration { | ||
return $config | ||
->addNamedFilter(NamedFilter::fromString('setono/tag-bag')) | ||
; | ||
}; |
Oops, something went wrong.