Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06b552a

Browse files
authored
Merge pull request #6 from veewee/php81
Add PHP81 support
2 parents a26c827 + 1bc0beb commit 06b552a

17 files changed

+74839
-70520
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ tools/ export-ignore
66
/.gitignore export-ignore
77
/phpunit.xml export-ignore
88
/phive.xml export-ignore
9-
/php_cs.dist export-ignore
9+
.php-cs-fixer.dist.php export-ignore
1010
/psalm.xml export-ignore

.github/workflows/analyzers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['7.4']
10+
php-versions: ['7.4', '8.0', '8.1']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.github/workflows/code-style.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['7.4']
10+
php-versions: ['7.4', '8.0', '8.1']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.github/workflows/functional.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest, windows-latest, macos-latest]
10-
php-versions: ['7.4', '8.0']
10+
php-versions: ['7.4', '8.0', '8.1']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['7.4', '8.0']
10+
php-versions: ['7.4', '8.0', '8.1']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/
22
.phpunit.cache
3-
.php_cs.cache
3+
.php-cs-fixer.cache
44
composer.lock
55
infection.log

.phive/phars.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="phpunit" version="^9.5.10" installed="9.5.10" location="./tools/phpunit.phar" copy="true"/>
4+
<phar name="psalm" version="^4.12.0" installed="4.12.0" location="./tools/psalm.phar" copy="true"/>
5+
<phar name="infection" version="^0.25" installed="0.25.3" location="./tools/infection.phar" copy="true"/>
6+
<phar name="php-cs-fixer" version="^3.3.2" installed="3.3.2" location="./tools/php-cs-fixer.phar" copy="true"/>
7+
</phive>

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
return PhpCsFixer\Config::create()
3+
return (new PhpCsFixer\Config())
44
->setFinder(
55
\Symfony\Component\Finder\Finder::create()
66
->in([
@@ -16,7 +16,9 @@
1616
'array_indentation' => true,
1717
'array_syntax' => ['syntax' => 'short'],
1818
'backtick_to_shell_exec' => true,
19-
'blank_line_before_return' => true,
19+
'blank_line_before_statement' => [
20+
'statements' => ['return']
21+
],
2022
'class_keyword_remove' => false,
2123
'combine_consecutive_issets' => true,
2224
'combine_consecutive_unsets' => true,
@@ -48,7 +50,9 @@
4850
'no_blank_lines_before_namespace' => false,
4951
'no_null_property_initialization' => true,
5052
'no_php4_constructor' => true,
51-
'no_short_echo_tag' => false,
53+
'echo_tag_syntax' => [
54+
'format' => 'long'
55+
],
5256
'no_superfluous_elseif' => true,
5357
'no_unreachable_default_argument_value' => true,
5458
'no_useless_else' => true,
@@ -62,7 +66,12 @@
6266
'php_unit_mock' => false,
6367
'php_unit_namespaced' => false,
6468
'php_unit_no_expectation_annotation' => false,
65-
'php_unit_ordered_covers' => true,
69+
'phpdoc_order_by_value' => [
70+
'annotations' => ['covers']
71+
],
72+
'php_unit_method_casing' => [
73+
'case' => 'snake_case',
74+
],
6675
'php_unit_set_up_tear_down_visibility' => true,
6776
'php_unit_strict' => false,
6877
'php_unit_test_annotation' => false,
@@ -71,7 +80,7 @@
7180
'phpdoc_order' => true,
7281
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
7382
'pow_to_exponentiation' => true,
74-
'psr0' => true,
83+
'psr_autoloading' => true,
7584
'random_api_migration' => false,
7685
'simplified_null_return' => true,
7786
'static_lambda' => false,

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4 || ^8.0",
14+
"php": "^7.4 || ^8.0.0 || ^8.1.0",
1515
"composer-plugin-api": "~2.0"
1616
},
1717
"require-dev": {
@@ -35,7 +35,7 @@
3535
"scripts": {
3636
"parallel": "ComposerRunParallel\\Scripts\\ParallelScript::initializeAndRun",
3737
"cs": "@fix-cs --dry-run",
38-
"fix-cs": "./tools/php-cs-fixer.phar fix",
38+
"fix-cs": "PHP_CS_FIXER_IGNORE_ENV=1 ./tools/php-cs-fixer.phar fix",
3939
"psalm": "./tools/psalm.phar",
4040
"tests": "./tools/phpunit.phar",
4141
"coverage": "@php ./tools/full-coverage-check.php .phpunit.cache/clover/clover.xml",

phive.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)