Skip to content

Commit

Permalink
Merge pull request #95 from siketyan/build/update-deps
Browse files Browse the repository at this point in the history
build(deps)!: Drop PHP 8.0, Upgrade to Symfony 6.2, Upgrade/Update other deps
  • Loading branch information
siketyan authored Feb 1, 2023
2 parents a790281 + b812bbf commit ef19786
Show file tree
Hide file tree
Showing 72 changed files with 1,209 additions and 1,069 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
strategy:
matrix:
php:
- '8.0'
- '8.1'
- '8.2'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -26,7 +26,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -38,13 +38,13 @@ jobs:
run: composer install --prefer-dist --no-progress

- name: Run linter
run: composer run-script lint
run: composer run-script analyse

- name: Run test suite
run: composer run-script codecov

- uses: codecov/codecov-action@v1
if: ${{ matrix.php }} == '8.0'
if: ${{ matrix.php }} == '8.1'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand Down
16 changes: 8 additions & 8 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

declare(strict_types=1);

require_once 'vendor/autoload.php';

use Quartetcom\StaticAnalysisKit\PhpCsFixer\Config;

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
;

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'array_syntax' => ['syntax' => 'short'],
return (new Config())
->addRiskyRules([
'no_trailing_whitespace_in_string' => false,
])
->setFinder($finder)
Expand Down
60 changes: 39 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,38 @@
"authors": [
{
"name": "Naoki Ikeguchi",
"email": "[email protected]"
"email": "[email protected]"
}
],
"minimum-stability": "stable",
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.2",
"mschop/pathogen": "^0.6.1",
"guzzlehttp/guzzle": "^7.5",
"mschop/pathogen": "^0.7.1",
"siketyan/yarn-lock": "^0.1.1",
"symfony/config": "^5.1",
"symfony/console": "^5.1",
"symfony/dependency-injection": "^5.1",
"symfony/process": "^5.1",
"symfony/yaml": "^5.1",
"symfony/config": "^6.2",
"symfony/console": "^6.2",
"symfony/dependency-injection": "^6.2",
"symfony/process": "^6.2",
"symfony/yaml": "^6.2",
"yosymfony/toml": "^1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.6",
"friendsofphp/php-cs-fixer": "^3.14",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/php-code-coverage": "^9.2",
"phpunit/phpunit": "^9.4",
"phpunit/phpunit": "^9.5",
"psr/cache": "^1",
"psr/log": "^1"
"psr/log": "^1",
"quartetcom/static-analysis-kit": "~8.1"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/quartetcom/static-analysis-kit.git"
}
],
"config": {
"sort-packages": true
},
Expand All @@ -44,18 +51,29 @@
"Siketyan\\Loxcan\\": "tests/"
}
},
"bin": [
"bin/loxcan"
],
"scripts": {
"lint": "php-cs-fixer fix -v --allow-risky=yes --dry-run",
"fix": "php-cs-fixer fix -v --allow-risky=yes",
"coverage": "phpdbg -qrr ./vendor/bin/phpunit -c ./phpunit.xml --coverage-html ./coverage",
"codecov": "phpdbg -qrr ./vendor/bin/phpunit -c ./phpunit.xml --coverage-clover ./coverage.xml",
"test": "phpunit ./tests",
"analyse": "PHP_CS_FIXER_IGNORE_ENV=1 static-analysis-kit analyse --no-phpstan",
"fix": "PHP_CS_FIXER_IGNORE_ENV=1 static-analysis-kit fix",
"fix:all": "PHP_CS_FIXER_IGNORE_ENV=1 static-analysis-kit fix --risky --rector",
"fix:rector": "PHP_CS_FIXER_IGNORE_ENV=1 static-analysis-kit fix --rector",
"fix:risky": "PHP_CS_FIXER_IGNORE_ENV=1 static-analysis-kit fix --risky",
"coverage": "XDEBUG_MODE=coverage phpunit -c ./phpunit.xml --coverage-html ./coverage",
"codecov": "XDEBUG_MODE=coverage phpunit -c ./phpunit.xml --coverage-clover ./coverage.xml",
"test": "phpunit -c ./phpunit.xml",
"tests": [
"@lint",
"@analyse",
"@test"
]
},
"bin": [
"bin/loxcan"
]
"scripts-descriptions": {
"analyse": "Analyses code in this project fully.",
"fix": "Tries to fix code in this project automatically.",
"fix:all": "Tries to fix code in this project automatically fully.",
"fix:rector": "Tries to fix code in this project automatically with rector enabled.",
"fix:risky": "Tries to fix code in this project automatically with risky rules.",
"test": "Runs the tests."
}
}
Loading

0 comments on commit ef19786

Please sign in to comment.