Skip to content

Commit cfade92

Browse files
authored
Merge pull request #17 from sclable/chore_drop_legacy
Chore drop legacy php versions and update support for:
2 parents 6a9e88d + 96d3756 commit cfade92

28 files changed

+1440
-605
lines changed

.php_cs

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,49 @@
11
<?php
22

33
$fixers = [
4-
'@Symfony' => true,
5-
'array_syntax' => array('syntax' => 'short'),
6-
'combine_consecutive_unsets' => true,
7-
'no_useless_else' => true,
8-
'no_useless_return' => true,
9-
'ordered_imports' => ['sortAlgorithm' => 'length'],
10-
'phpdoc_indent' => false,
11-
'phpdoc_annotation_without_dot' => false,
12-
'phpdoc_no_empty_return' => false,
13-
'concat_space' => [
14-
'spacing' => 'one',
4+
'@Symfony' => true,
5+
'array_syntax' => array('syntax' => 'short'),
6+
'combine_consecutive_unsets' => true,
7+
'no_useless_else' => true,
8+
'no_useless_return' => true,
9+
'ordered_imports' => ['sortAlgorithm' => 'length'],
10+
'concat_space' => [
11+
'spacing' => 'one',
12+
],
13+
'yoda_style' => false,
14+
'dir_constant' => false,
15+
'phpdoc_indent' => false,
16+
'phpdoc_annotation_without_dot' => false,
17+
'phpdoc_no_empty_return' => true,
18+
'phpdoc_add_missing_param_annotation' => true,
19+
'phpdoc_order' => true,
20+
'phpdoc_types_order' => true,
21+
'general_phpdoc_annotation_remove' => [
22+
'author'
23+
],
24+
'void_return' => false,
25+
'single_trait_insert_per_statement' => false,
26+
'ternary_to_null_coalescing' => true,
27+
'pow_to_exponentiation' => false,
28+
'random_api_migration' => false,
29+
'declare_strict_types' => false,
30+
'phpdoc_no_alias_tag' => [
31+
'replacements' => [
32+
'type' => 'var',
33+
'link' => 'see',
1534
],
35+
],
36+
'header_comment' => [
37+
'commentType' => 'PHPDoc',
38+
'header' => 'This file is part of the Sclable Xml Lint Package.
39+
40+
@copyright (c) ' . date('Y') . ' Sclable Business Solutions GmbH
41+
42+
For the full copyright and license information, please view the LICENSE
43+
file that was distributed with this source code.',
44+
'location' => 'after_declare_strict',
45+
//'separate' => 'bottom',
46+
],
1647
];
1748

1849
return PhpCsFixer\Config::create()
@@ -21,5 +52,8 @@ return PhpCsFixer\Config::create()
2152
->in(__DIR__ . '/src')
2253
->in(__DIR__ . '/tests')
2354
->in(__DIR__ . '/bin')
55+
// Note: The pattern is seen relative from one of the `->in()`
56+
// directories. And works for files too this way.
57+
->notPath('bootstrap.php')
2458
)
2559
->setRules($fixers);

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
language: php
22
php:
3-
- '5.5.9'
4-
- '5.6'
5-
- '7.0'
6-
- '7.1'
73
- '7.2'
4+
- '7.3'
5+
- '7.4'
86

97
install:
108
- export COMPOSER_HOME=$(pwd)/.composer_home
119
- export COMPOSER_CACHE=$(pwd)/.composer_cache
1210
- mkdir -p COMPOSER_HOME COMPOSER_CACHE
1311
- rm composer.lock
14-
- composer global require --no-progress --no-suggest --no-interaction --prefer-dist "phpunit/phpunit:^4.8" "behat/behat:3.*" friendsofphp/php-cs-fixer
15-
- composer install --no-dev --no-progress --no-suggest --no-interaction --prefer-dist
12+
- composer global require --no-progress --no-suggest --no-interaction --prefer-dist "phpunit/phpunit:8.*|^9.1" "behat/behat:3.*" friendsofphp/php-cs-fixer
13+
- composer install --no-dev --no-progress --no-suggest --no-interaction --prefer-dist --ignore-platform-reqs
1614
- composer dump -o -a --no-interaction
1715

1816
script:

behat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
default:
33
suites:
44
default:
5-
paths: [ %paths.base%/tests/functional ]
6-
contexts: [ sclable\xmlLint\tests\functional\contexts\FeatureContext ]
5+
paths: [ "%paths.base%/tests/functional" ]
6+
contexts: [ sclable\xmlLint\tests\functional\contexts\FeatureContext ]

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
],
1818
"bin": ["bin/xmllint"],
1919
"require": {
20-
"symfony/console": "^2.7|3.*|4.*",
21-
"symfony/finder": "^2.7|3.*|4.*"
20+
"php": "7.2.*|7.3.*|7.4.*",
21+
"symfony/console": "3.4.*|4.4.*|5.*",
22+
"symfony/finder": "3.4.*|4.4.*|5.*"
2223
},
2324
"require-dev": {
2425
"behat/behat": "^3.0",
25-
"phpunit/phpunit": "^4.8"
26+
"phpunit/phpunit": "^9.1"
2627
},
2728
"autoload": {
2829
"psr-4": {

0 commit comments

Comments
 (0)