Skip to content

Commit

Permalink
Merge pull request #56 from certificationy/upgrade/requirements
Browse files Browse the repository at this point in the history
Dependencies upgrade
  • Loading branch information
mickaelandrieu authored Jul 13, 2021
2 parents ddd4f88 + f886e41 commit 5de7c02
Show file tree
Hide file tree
Showing 13 changed files with 3,195 additions and 862 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Quality

on:
push:
pull_request:

jobs:
code-quality:
name: Code Quality
runs-on: ubuntu-latest

strategy:
matrix:
php: ['7.4','8']

steps:
- name: "Init repository"
uses: actions/checkout@v2

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xsl
tools: composer

- name: "Install dependencies"
run: composer install

- name: "PHPStan"
run: composer phpstan

- name: "PHP-CS-Fixer"
run: composer cs-fix

- name: "Test suite"
run: composer test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/*.phar
/vendor
.phpunit.result.cache
.php_cs.cache
40 changes: 40 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

$finder = PhpCsFixer\Finder::create()->in([
__DIR__.'/src',
__DIR__.'/tests',
]);

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'concat_space' => [
'spacing' => 'one',
],
'cast_spaces' => [
'space' => 'single',
],
'error_suppression' => [
'mute_deprecation_error' => false,
'noise_remaining_usages' => false,
'noise_remaining_usages_exclude' => [],
],
'function_to_constant' => false,
'no_alias_functions' => false,
'non_printable_character' => false,
'phpdoc_summary' => false,
'phpdoc_align' => [
'align' => 'left',
],
'protected_to_private' => false,
'psr4' => false,
'self_accessor' => false,
'yoda_style' => null,
'non_printable_character' => true,
'phpdoc_no_empty_return' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
])
->setFinder($finder)
->setCacheFile(__DIR__.'/.php_cs.cache')
;
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

31 changes: 24 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@
}
],
"require": {
"php": ">=7.0",
"symfony/console": ">=3.2.13 <3.3.0 || >=3.3.6 < 4.0.0",
"certificationy/certificationy": "~2.0",
"symfony/yaml": "~3.2",
"certificationy/symfony-pack": "~1.4",
"certificationy/php-pack": "~1.4"
"php": "^7.4|^8.0",
"symfony/console": "^4.4 || ^5.3",
"certificationy/certificationy": "^2.0",
"symfony/yaml": "^4.4 || ^5.3",
"certificationy/symfony-pack": "^1.4",
"certificationy/php-pack": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "~6.0"
"friendsofphp/php-cs-fixer": "^2.18",
"php-parallel-lint/php-parallel-lint": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {"Certificationy\\Cli\\": "src"}
Expand All @@ -42,5 +46,18 @@
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"scripts": {
"cs-fix": "@php ./vendor/bin/php-cs-fixer fix",
"phpstan": "@php ./vendor/bin/phpstan analyse src --level max",
"test": "@php ./vendor/bin/phpunit"
},
"scripts-descriptions": {
"cs-fix": "Check and fix coding styles using PHP CS Fixer",
"phpstan": "Execute PHPStan analysis",
"test": "Launch PHPUnit test suite"
},
"config": {
"sort-packages": true
}
}
Loading

0 comments on commit 5de7c02

Please sign in to comment.