Skip to content

Commit 85d7f3d

Browse files
authored
Merge pull request #4 from SychO9/pr-back
PHP 8.1 Compatibility
2 parents c03391a + c4f2f31 commit 85d7f3d

14 files changed

+55
-62
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.{diff,md}]
16+
trim_trailing_whitespace = false
17+
18+
[*.{php,xml,json}]
19+
indent_size = 4

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ language: php
1212

1313
matrix:
1414
include:
15-
- php: 7.1
16-
env: CHECKS=yes
17-
- php: 7.2
1815
- php: 7.3
16+
env: CHECKS=yes
17+
- php: 7.4
18+
- php: 8.0
19+
- php: 8.1
1920

2021
sudo: false
2122

composer.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,29 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=7.1",
18+
"php": ">=7.3",
1919
"axy/backtrace": "~2.0.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^7.5",
22+
"phpunit/phpunit": "^9.0",
2323
"squizlabs/php_codesniffer": "^3.4",
2424
"phpmd/phpmd": "^2.6"
2525
},
2626
"autoload": {
2727
"psr-4": {
28-
"axy\\errors\\": "src",
29-
"axy\\errors\\tests\\": "tests"
28+
"axy\\errors\\": "src/"
3029
}
3130
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"axy\\errors\\tests\\": "tests/"
34+
}
35+
},
36+
"scripts": {
37+
"test": "phpunit -c phpunit.xml.dist",
38+
"md": "phpmd --exclude vendor . text phpmd.xml.dist",
39+
"cs": "phpcs --standard=PSR2 --encoding=utf-8 --ignore=vendor ."
40+
},
3241
"archive": {
3342
"exclude": ["/tests/*", "/doc/*", "/cs.sh", "/phpmd.sh", "/*.xml.dist", "/CHANGELOG.md"]
3443
}

cs.sh

100755100644
File mode changed.

index.php

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

phpmd.sh

100755100644
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ args="text phpmd.xml.dist"
55

66
if [ "$#" -ne 0 ]; then
77
${cmd} "$@" ${args}
8-
else
8+
else
99
${cmd} . ${args}
1010
fi
11-

phpunit.xml.dist

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit backupGlobals="false"
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
5+
backupGlobals="false"
46
backupStaticAttributes="false"
57
colors="true"
68
convertErrorsToExceptions="true"
79
convertNoticesToExceptions="true"
810
convertWarningsToExceptions="true"
911
processIsolation="false"
1012
stopOnFailure="false"
11-
bootstrap="tests/bootstrap.php"
12-
cacheResult="false"
1313
>
14-
<testsuites>
15-
<testsuite name="Base Test Suite">
16-
<directory suffix="Test.php">./tests/</directory>
17-
</testsuite>
18-
</testsuites>
1914

20-
<filter>
21-
<whitelist processUncoveredFilesFromWhitelist="true">
22-
<directory suffix=".php">./src</directory>
23-
</whitelist>
24-
</filter>
15+
<coverage processUncoveredFiles="true">
16+
<include>
17+
<directory suffix=".php">./src</directory>
18+
</include>
19+
</coverage>
20+
<testsuites>
21+
<testsuite name="Base Test Suite">
22+
<directory suffix="Test.php">./tests/</directory>
23+
</testsuite>
24+
</testsuites>
2525
</phpunit>
2626

src/ContainerReadOnly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @link https://github.com/axypro/errors/blob/master/doc/classes/ContainerReadOnly.md documentation
1717
*/
18-
class ContainerReadOnly extends Logic implements ReadOnly
18+
class ContainerReadOnly extends Logic implements ReadOnlyException
1919
{
2020
/**
2121
* {@inheritdoc}

src/PropertyReadOnly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @link https://github.com/axypro/errors/blob/master/doc/classes/PropertyReadOnly.md documentation
1717
*/
18-
class PropertyReadOnly extends Logic implements ReadOnly
18+
class PropertyReadOnly extends Logic implements ReadOnlyException
1919
{
2020
/**
2121
* {@inheritdoc}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
*
1414
* @link https://github.com/axypro/errors/blob/master/doc/errors.md documentation
1515
*/
16-
interface ReadOnly extends Forbidden
16+
interface ReadOnlyException extends Forbidden
1717
{
1818
}

0 commit comments

Comments
 (0)