Skip to content

Commit 8f5a464

Browse files
Fix PHP 8.4 deprecations nullable objects (#179)
1 parent 57d685d commit 8f5a464

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.github/workflows/test-application.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ jobs:
8282
dependency-versions: 'highest'
8383
tools: 'composer:v2'
8484
php-cs-fixer: false
85-
max-phpunit-version: '8'
85+
86+
- php-version: '8.4'
87+
elasticsearch-version: '7.17.19'
88+
elasticsearch-package-constraint: '~7.17.0'
89+
minimum-stability: 'dev'
90+
dependency-versions: 'highest'
91+
tools: 'composer:v2'
92+
php-cs-fixer: false
8693

8794
services:
8895
elasticsearch:

.php_cs.dist

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ return PhpCsFixer\Config::create()
2929
'phpdoc_align' => ['align' => 'left'],
3030
'phpdoc_types_order' => false,
3131
'single_line_throw' => false,
32+
'nullable_type_declaration_for_default_null_value' => true,
3233
])
3334
->setFinder($finder);

Command/PurgeCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class PurgeCommand extends Command
4040

4141
public function __construct(
4242
SearchManagerInterface $searchManager,
43-
QuestionHelper $questionHelper = null
43+
?QuestionHelper $questionHelper = null
4444
) {
4545
parent::__construct(self::$defaultName);
4646

Command/ReindexCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(
6565
SearchManagerInterface $searchManager,
6666
ReindexProviderRegistry $providerRegistry,
6767
$env,
68-
QuestionHelper $questionHelper = null
68+
?QuestionHelper $questionHelper = null
6969
) {
7070
parent::__construct(self::$defaultName);
7171

Search/Event/IndexRebuildEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class IndexRebuildEvent extends AbstractEvent
4040
* @param mixed $purge If the indexes should be purged
4141
* @param OutputInterface $output
4242
*/
43-
public function __construct($filter, $purge, OutputInterface $output = null)
43+
public function __construct($filter, $purge, ?OutputInterface $output = null)
4444
{
4545
$this->filter = $filter;
4646
$this->purge = $purge;

0 commit comments

Comments
 (0)