Skip to content

Commit

Permalink
minor #54308 Add more explicit nullable types for default null values…
Browse files Browse the repository at this point in the history
… (alexandre-daubois)

This PR was merged into the 5.4 branch.

Discussion
----------

Add more explicit nullable types for default null values

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Continuing to bring deprecation-free support for PHP 8.4 (https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)

If this gets merged, I'll take care of adding missing ones in upper branches if not done during upmerge 🙂

Commits
-------

e9d30bac03 Add more explicit nullable types for default null values
  • Loading branch information
nicolas-grekas committed Mar 19, 2024
2 parents a748704 + cf37ead commit 1fc3b1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/Fixtures/ContainerAwareFixture.php
Expand Up @@ -20,7 +20,7 @@ class ContainerAwareFixture implements FixtureInterface, ContainerAwareInterface
{
public $container;

public function setContainer(ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/Type/StringWrapper.php
Expand Up @@ -15,7 +15,7 @@ class StringWrapper
{
private $string;

public function __construct(string $string = null)
public function __construct(?string $string = null)
{
$this->string = $string;
}
Expand Down

0 comments on commit 1fc3b1a

Please sign in to comment.