Skip to content

Commit acb821e

Browse files
odanodan
authored andcommitted
Update dependencies
1 parent 78138e8 commit acb821e

File tree

5 files changed

+79
-64
lines changed

5 files changed

+79
-64
lines changed

.cs.php

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
11
<?php
22

3-
return PhpCsFixer\Config::create()
3+
use PhpCsFixer\Config;
4+
5+
return (new Config())
46
->setUsingCache(false)
57
->setRiskyAllowed(true)
68
//->setCacheFile(__DIR__ . '/.php_cs.cache')
7-
->setRules([
8-
'@PSR1' => true,
9-
'@PSR2' => true,
10-
'@Symfony' => true,
11-
'psr4' => true,
12-
// custom rules
13-
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], // psr-5
14-
'phpdoc_to_comment' => false,
15-
'no_superfluous_phpdoc_tags' => false,
16-
'array_indentation' => true,
17-
'array_syntax' => ['syntax' => 'short'],
18-
'cast_spaces' => ['space' => 'none'],
19-
'concat_space' => ['spacing' => 'one'],
20-
'compact_nullable_typehint' => true,
21-
'declare_equal_normalize' => ['space' => 'single'],
22-
'increment_style' => ['style' => 'post'],
23-
'list_syntax' => ['syntax' => 'short'],
24-
'no_short_echo_tag' => true,
25-
'phpdoc_summary' => false, // Summaries are like titles, no full stop
26-
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
27-
'phpdoc_trim_consecutive_blank_line_separation' => true,
28-
'phpdoc_trim' => true,
29-
'phpdoc_align' => false,
30-
'phpdoc_no_empty_return' => false,
31-
'phpdoc_order' => false, // We do not adhere to PSR-5 (draft)
32-
'phpdoc_separation' => false, // No blank lines between different types of annotations
33-
'phpdoc_no_useless_inheritdoc' => false,
34-
'protected_to_private' => false,
35-
'yoda_style' => false,
36-
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
37-
'ordered_imports' => [
38-
'sort_algorithm' => 'alpha',
39-
'imports_order' => ['class', 'const', 'function']
40-
],
41-
'single_line_throw' => false,
42-
])
43-
->setFinder(PhpCsFixer\Finder::create()
44-
->in(__DIR__ . '/src')
45-
->in(__DIR__ . '/tests')
46-
->name('*.php')
47-
->ignoreDotFiles(true)
48-
->ignoreVCS(true));
9+
->setRules(
10+
[
11+
'@PSR1' => true,
12+
'@PSR2' => true,
13+
'@Symfony' => true,
14+
'psr_autoloading' => true,
15+
// custom rules
16+
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], // psr-5
17+
'phpdoc_to_comment' => false,
18+
'no_superfluous_phpdoc_tags' => false,
19+
'array_indentation' => true,
20+
'array_syntax' => ['syntax' => 'short'],
21+
'cast_spaces' => ['space' => 'none'],
22+
'concat_space' => ['spacing' => 'one'],
23+
'compact_nullable_typehint' => true,
24+
'declare_equal_normalize' => ['space' => 'single'],
25+
'increment_style' => ['style' => 'post'],
26+
'list_syntax' => ['syntax' => 'short'],
27+
'echo_tag_syntax' => ['format' => 'long'],
28+
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
29+
'phpdoc_align' => false,
30+
'phpdoc_no_empty_return' => false,
31+
'phpdoc_order' => true, // psr-5
32+
'phpdoc_no_useless_inheritdoc' => false,
33+
'protected_to_private' => false,
34+
'yoda_style' => false,
35+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
36+
'ordered_imports' => [
37+
'sort_algorithm' => 'alpha',
38+
'imports_order' => ['class', 'const', 'function'],
39+
],
40+
'single_line_throw' => false,
41+
'fully_qualified_strict_types' => true,
42+
'global_namespace_import' => false,
43+
]
44+
)
45+
->setFinder(
46+
PhpCsFixer\Finder::create()
47+
->in(__DIR__ . '/src')
48+
->in(__DIR__ . '/tests')
49+
->name('*.php')
50+
->ignoreDotFiles(true)
51+
->ignoreVCS(true)
52+
);

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: [ubuntu-latest]
11-
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
11+
php-versions: ['7.2', '7.3', '7.4']
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:
@@ -37,4 +37,4 @@ jobs:
3737
run: composer install --prefer-dist --no-progress --no-suggest
3838

3939
- name: Run test suite
40-
run: composer build:check
40+
run: composer test:all

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Changed minimum version to PHP 7.2
12+
13+
### Dependency Updated
14+
15+
- Upgrading phpstan/phpstan (0.12.100 => 1.10.16)
16+
- php-cs-fixer/diff updated from v1.3.1 to v2.0.2 major
17+
- overtrue/phplint removed (installed version was 1.2.4)
18+
- friendsofphp/php-cs-fixer updated from v2.19.3 to v3.9.5 major
19+
920
### Added
1021

1122
- Add Code Climate with PHPMD enabled

composer.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "orca-services/nova-api",
33
"description": "A PHP client library for the NOVA API",
4+
"license": "MIT",
45
"keywords": [
56
"nova",
67
"api",
@@ -10,20 +11,18 @@
1011
"soap",
1112
"4klang"
1213
],
13-
"license": "MIT",
1414
"require": {
15-
"php": "^7.0",
15+
"php": "^7.2",
1616
"ext-dom": "*",
17-
"cakephp/chronos": "^1|^2",
17+
"cakephp/chronos": "^1 || ^2",
1818
"guzzlehttp/guzzle": "^6.5"
1919
},
2020
"require-dev": {
21-
"friendsofphp/php-cs-fixer": "^2.16",
22-
"overtrue/phplint": "^1.1",
21+
"friendsofphp/php-cs-fixer": "^3",
2322
"php-di/php-di": "^6",
24-
"phpstan/phpstan": "0.*",
25-
"phpunit/phpunit": "^6|^7",
26-
"squizlabs/php_codesniffer": "^3.4"
23+
"phpstan/phpstan": "^1",
24+
"phpunit/phpunit": "^6 || ^7",
25+
"squizlabs/php_codesniffer": "^3"
2726
},
2827
"autoload": {
2928
"psr-4": {
@@ -39,20 +38,18 @@
3938
"sort-packages": true
4039
},
4140
"scripts": {
42-
"build:check": [
43-
"@lint",
41+
"cs:check": "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi",
42+
"cs:fix": "php-cs-fixer fix --config=.cs.php --ansi",
43+
"sniffer:check": "phpcs --standard=phpcs.xml",
44+
"sniffer:fix": "phpcbf --standard=phpcs.xml",
45+
"stan": "phpstan analyse -c phpstan.neon --no-progress --ansi",
46+
"test": "phpunit --configuration phpunit.xml --colors=always",
47+
"test:all": [
4448
"@cs:check",
4549
"@sniffer:check",
46-
"@phpstan",
50+
"@stan",
4751
"@test:coverage"
4852
],
49-
"cs:check": "php-cs-fixer fix --dry-run --format=txt --verbose --diff --diff-format=udiff --config=.cs.php",
50-
"cs:fix": "php-cs-fixer fix --config=.cs.php",
51-
"lint": "phplint ./ --exclude=vendor --no-interaction --no-cache",
52-
"phpstan": "phpstan analyse src --level=max -c phpstan.neon --no-progress --ansi",
53-
"sniffer:check": "phpcs --standard=phpcs.xml",
54-
"sniffer:fix": "phpcbf --standard=phpcs.xml",
55-
"test": "phpunit --configuration phpunit.xml --colors=always",
5653
"test:coverage": "phpunit --configuration phpunit.xml --colors=always --coverage-clover build/logs/clover.xml --coverage-html build/coverage"
5754
}
5855
}

phpstan.neon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
parameters:
2+
level: 8
23
checkMissingIterableValueType: false
34
checkGenericClassInNonGenericObjectType: false
4-
ignoreErrors:
5+
paths:
6+
- src
7+
- tests

0 commit comments

Comments
 (0)