Skip to content

Commit 4e36238

Browse files
authored
Merge pull request #31 from chadicus/master
Add Support for PHP > 7.0
2 parents 3b1f5f1 + d9dd83f commit 4e36238

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
14+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v2

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
"sort-packages": true
88
},
99
"require": {
10-
"php": "^7.0"
10+
"php": ">=7.0"
1111
},
1212
"require-dev": {
13-
"phpunit/phpunit": "^6.0",
14-
"squizlabs/php_codesniffer": "^3.3",
15-
"symfony/yaml": ">=2.0.5"
13+
"phpunit/phpunit": ">=6.0",
14+
"squizlabs/php_codesniffer": "^3.3"
1615
},
1716
"autoload": {
1817
"psr-4": { "SubjectivePHP\\Util\\": "src/" }

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<file>src</file>
44
<file>tests</file>
55
<arg value="p" />
6-
<rule ref="PSR2" />
6+
<rule ref="PSR12" />
77
</ruleset>

src/Exception.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class Exception
1717
*
1818
* @return Throwable
1919
*/
20-
final public static function getBaseException(Throwable $throwable) : Throwable
20+
final public static function getBaseException(Throwable $throwable): Throwable
2121
{
2222
while ($throwable->getPrevious() !== null) {
2323
$throwable = $throwable->getPrevious();
@@ -56,7 +56,7 @@ final public static function raise(int $level, string $message, string $file = n
5656
*
5757
* @return array
5858
*/
59-
final public static function toArray(Throwable $throwable, bool $traceAsString = false, int $depth = 512) : array
59+
final public static function toArray(Throwable $throwable, bool $traceAsString = false, int $depth = 512): array
6060
{
6161
$result = [
6262
'type' => get_class($throwable),

tests/ExceptionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace SubjectivePHPTests\Util;
34

45
use SubjectivePHP\Util\Exception;

0 commit comments

Comments
 (0)