Skip to content

Commit

Permalink
Fix PHP 8.4 deprecations nullable objects
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Dec 2, 2024
1 parent 57d685d commit 89bdac6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"symfony/security-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/validator": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.0.4 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.0.4 || ^6.0 || ~7.1.*",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"doctrine/doctrine-bundle": "^1.10 || ^2.0",
"doctrine/orm": "^2.5",
Expand Down

0 comments on commit 89bdac6

Please sign in to comment.