Skip to content

Commit

Permalink
Fix PHP 8.4 deprecations nullable objects (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored Dec 2, 2024
1 parent 57d685d commit 8f5a464
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false
max-phpunit-version: '8'

- php-version: '8.4'
elasticsearch-version: '7.17.19'
elasticsearch-package-constraint: '~7.17.0'
minimum-stability: 'dev'
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false

services:
elasticsearch:
Expand Down
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ return PhpCsFixer\Config::create()
'phpdoc_align' => ['align' => 'left'],
'phpdoc_types_order' => false,
'single_line_throw' => false,
'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder($finder);
2 changes: 1 addition & 1 deletion Command/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PurgeCommand extends Command

public function __construct(
SearchManagerInterface $searchManager,
QuestionHelper $questionHelper = null
?QuestionHelper $questionHelper = null
) {
parent::__construct(self::$defaultName);

Expand Down
2 changes: 1 addition & 1 deletion Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(
SearchManagerInterface $searchManager,
ReindexProviderRegistry $providerRegistry,
$env,
QuestionHelper $questionHelper = null
?QuestionHelper $questionHelper = null
) {
parent::__construct(self::$defaultName);

Expand Down
2 changes: 1 addition & 1 deletion Search/Event/IndexRebuildEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class IndexRebuildEvent extends AbstractEvent
* @param mixed $purge If the indexes should be purged
* @param OutputInterface $output
*/
public function __construct($filter, $purge, OutputInterface $output = null)
public function __construct($filter, $purge, ?OutputInterface $output = null)
{
$this->filter = $filter;
$this->purge = $purge;
Expand Down

0 comments on commit 8f5a464

Please sign in to comment.