Skip to content

Commit

Permalink
[TASK] Prevent PHP 8.4 deprecation (#38)
Browse files Browse the repository at this point in the history
Add PHP 8.4 to test matrix.

Update Diff->__construct() to avoid
"Implicit nullable" PHP 8.4 deprecations.
  • Loading branch information
lolli42 committed Jul 9, 2024
1 parent 8d535de commit 30798a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion src/Diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Diff
* @param RendererInterface|null $renderer Diff renderer.
* @param ParserInterface|null $parser Parser used to generate opcodes.
*/
public function __construct(GranularityInterface $granularity = null, RendererInterface $renderer = null, ParserInterface $parser = null)
public function __construct(?GranularityInterface $granularity = null, ?RendererInterface $renderer = null, ?ParserInterface $parser = null)
{
$this->granularity = $granularity ?? new Character();
$this->renderer = $renderer ?? new Html();
Expand Down

0 comments on commit 30798a5

Please sign in to comment.