Skip to content

Commit

Permalink
Upgrade to PHP 8.1 and higher.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed Jan 25, 2023
1 parent 371d3e0 commit 56aae5b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.1"
- "8.2"
- "8.3"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"license": "MIT",
"require": {
"php": ">=7.4"
"php": ">=8.1"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
8 changes: 4 additions & 4 deletions src/FormattedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ trait FormattedException
/**
* Object constructor.
*
* @param mixed ... The arguments, see {@see formattedConstruct()}.
* @param mixed ...$args The arguments, see {@see formattedConstruct()}.
*
* @since 2.0.0
* @api
*/
public function __construct()
public function __construct(...$args)
{
list($message, $code, $previous) = self::formattedConstruct(func_get_args());
list($message, $code, $previous) = self::formattedConstruct($args);

parent::__construct($message, $code, $previous);
}
Expand Down Expand Up @@ -75,7 +75,7 @@ public function __construct()
* @since 1.0.0
* @api
*/
public static function formattedConstruct($args): array
public static function formattedConstruct(array $args): array
{
$code = 0;
$previous = null;
Expand Down
4 changes: 2 additions & 2 deletions test/FormattedExceptionTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class FormattedExceptionTestBase extends TestCase
*
* @var string
*/
static $class;
static string $class;

/**
* The name of the exception.
*
* @var string
*/
static $name;
static string $name;

//--------------------------------------------------------------------------------------------------------------------

Expand Down

0 comments on commit 56aae5b

Please sign in to comment.