Skip to content

Commit 56aae5b

Browse files
committed
Upgrade to PHP 8.1 and higher.
1 parent 371d3e0 commit 56aae5b

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

.github/workflows/unit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php-version:
19-
- "7.4"
2019
- "8.1"
2120
- "8.2"
2221
- "8.3"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"license": "MIT",
99
"require": {
10-
"php": ">=7.4"
10+
"php": ">=8.1"
1111
},
1212
"minimum-stability": "dev",
1313
"prefer-stable": true,

src/FormattedException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ trait FormattedException
2929
/**
3030
* Object constructor.
3131
*
32-
* @param mixed ... The arguments, see {@see formattedConstruct()}.
32+
* @param mixed ...$args The arguments, see {@see formattedConstruct()}.
3333
*
3434
* @since 2.0.0
3535
* @api
3636
*/
37-
public function __construct()
37+
public function __construct(...$args)
3838
{
39-
list($message, $code, $previous) = self::formattedConstruct(func_get_args());
39+
list($message, $code, $previous) = self::formattedConstruct($args);
4040

4141
parent::__construct($message, $code, $previous);
4242
}
@@ -75,7 +75,7 @@ public function __construct()
7575
* @since 1.0.0
7676
* @api
7777
*/
78-
public static function formattedConstruct($args): array
78+
public static function formattedConstruct(array $args): array
7979
{
8080
$code = 0;
8181
$previous = null;

test/FormattedExceptionTestBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class FormattedExceptionTestBase extends TestCase
1919
*
2020
* @var string
2121
*/
22-
static $class;
22+
static string $class;
2323

2424
/**
2525
* The name of the exception.
2626
*
2727
* @var string
2828
*/
29-
static $name;
29+
static string $name;
3030

3131
//--------------------------------------------------------------------------------------------------------------------
3232

0 commit comments

Comments
 (0)