Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 8.4 support #765

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

strategy:
matrix:
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -30,23 +30,23 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Fix PHPUnit Version PHP < 7.4
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "phpunit/phpunit:^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8" --dev --no-update --no-interaction
if: "matrix.php < 7.4"

- name: Fix PHPUnit Version PHP >= 7.4
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "phpunit/phpunit:^9.3.3" --dev --no-update --no-interaction
if: "matrix.php >= 7.4"

- name: Install PHP Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"test": "phpunit --testdox tests"
},
"require": {
"php": "^5.5.9 || ^7.0 || ^8.0",
"php": "^7.1 || ^8.0",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
"mockery/mockery": "^0.9 || ^1.0",
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
"mockery/mockery": "^1.0",
"symfony/var-dumper": "^4.0 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
Expand Down
2 changes: 1 addition & 1 deletion src/Whoops/Handler/PrettyPageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public function addDataTableCallback($label, /* callable */ $callback)
throw new InvalidArgumentException('Expecting callback argument to be callable');
}

$this->extraTables[$label] = function (\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
$this->extraTables[$label] = function (?\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
try {
$result = call_user_func($callback, $inspector);

Expand Down
2 changes: 1 addition & 1 deletion src/Whoops/Run.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ final class Run implements RunInterface
*/
private $frameFilters = [];

public function __construct(SystemFacade $system = null)
public function __construct(?SystemFacade $system = null)
{
$this->system = $system ?: new SystemFacade;
$this->inspectorFactory = new InspectorFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Whoops/Util/TemplateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function slug($original)
*
* @param string $template
*/
public function render($template, array $additionalVariables = null)
public function render($template, ?array $additionalVariables = null)
{
$variables = $this->getVariables();

Expand Down
Loading