Skip to content

Commit b724b05

Browse files
committed
Fixed "implicitly marking parameter as nullable" deprecations in PHP 8.4 fixed
1 parent d94c4af commit b724b05

31 files changed

+50
-50
lines changed

src/ApiPlatform/AddDocumentedAPIPropertiesJSONSchemaFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public function buildSchema(
4343
string $className,
4444
string $format = 'json',
4545
string $type = Schema::TYPE_OUTPUT,
46-
Operation $operation = null,
47-
Schema $schema = null,
48-
array $serializerContext = null,
46+
?Operation $operation = null,
47+
?Schema $schema = null,
48+
?array $serializerContext = null,
4949
bool $forceCollection = false
5050
): Schema {
5151

src/ApiPlatform/Filter/EntityFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class EntityFilter extends AbstractFilter
3737
public function __construct(
3838
ManagerRegistry $managerRegistry,
3939
private readonly EntityFilterHelper $filter_helper,
40-
LoggerInterface $logger = null,
40+
?LoggerInterface $logger = null,
4141
?array $properties = null,
4242
?NameConverterInterface $nameConverter = null
4343
) {
@@ -50,7 +50,7 @@ protected function filterProperty(
5050
QueryBuilder $queryBuilder,
5151
QueryNameGeneratorInterface $queryNameGenerator,
5252
string $resourceClass,
53-
Operation $operation = null,
53+
?Operation $operation = null,
5454
array $context = []
5555
): void {
5656
if (

src/ApiPlatform/Filter/LikeFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function filterProperty(
3838
QueryBuilder $queryBuilder,
3939
QueryNameGeneratorInterface $queryNameGenerator,
4040
string $resourceClass,
41-
Operation $operation = null,
41+
?Operation $operation = null,
4242
array $context = []
4343
): void {
4444
// Otherwise filter is applied to order and page as well

src/ApiPlatform/Filter/PartStoragelocationFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class PartStoragelocationFilter extends AbstractFilter
3838
public function __construct(
3939
ManagerRegistry $managerRegistry,
4040
private readonly EntityFilterHelper $filter_helper,
41-
LoggerInterface $logger = null,
41+
?LoggerInterface $logger = null,
4242
?array $properties = null,
4343
?NameConverterInterface $nameConverter = null
4444
) {
@@ -51,7 +51,7 @@ protected function filterProperty(
5151
QueryBuilder $queryBuilder,
5252
QueryNameGeneratorInterface $queryNameGenerator,
5353
string $resourceClass,
54-
Operation $operation = null,
54+
?Operation $operation = null,
5555
array $context = []
5656
): void {
5757
//Do not check for mapping here, as we are using a virtual property

src/Command/User/UserEnableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#[AsCommand('partdb:users:enable|partdb:user:enable', 'Enables/Disable the login of one or more users')]
3636
class UserEnableCommand extends Command
3737
{
38-
public function __construct(protected EntityManagerInterface $entityManager, string $name = null)
38+
public function __construct(protected EntityManagerInterface $entityManager, ?string $name = null)
3939
{
4040
parent::__construct($name);
4141
}

src/DataTables/Adapters/TwoStepORMAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class TwoStepORMAdapter extends ORMAdapter
5454

5555
private \Closure|null $query_modifier = null;
5656

57-
public function __construct(ManagerRegistry $registry = null)
57+
public function __construct(?ManagerRegistry $registry = null)
5858
{
5959
parent::__construct($registry);
6060
$this->detailQueryCallable = static function (QueryBuilder $qb, array $ids): never {

src/DataTables/Filters/Constraints/AbstractConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
* @var string The property where this BooleanConstraint should apply to
4646
*/
4747
protected string $property,
48-
string $identifier = null)
48+
?string $identifier = null)
4949
{
5050
$this->identifier = $identifier ?? $this->generateParameterIdentifier($property);
5151
}

src/DataTables/Filters/Constraints/BooleanConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BooleanConstraint extends AbstractConstraint
2828
{
2929
public function __construct(
3030
string $property,
31-
string $identifier = null,
31+
?string $identifier = null,
3232
/** @var bool|null The value of our constraint */
3333
protected ?bool $value = null
3434
)

src/DataTables/Filters/Constraints/DateTimeConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DateTimeConstraint extends AbstractConstraint
3434

3535
public function __construct(
3636
string $property,
37-
string $identifier = null,
37+
?string $identifier = null,
3838
/**
3939
* The value1 used for comparison (this is the main one used for all mono-value comparisons)
4040
*/

src/DataTables/Filters/Constraints/EntityConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class EntityConstraint extends AbstractConstraint
4646
public function __construct(protected ?NodesListBuilder $nodesListBuilder,
4747
protected string $class,
4848
string $property,
49-
string $identifier = null,
49+
?string $identifier = null,
5050
protected ?AbstractDBElement $value = null,
5151
protected ?string $operator = null)
5252
{

0 commit comments

Comments
 (0)