Skip to content

Commit

Permalink
fix: Address the PHP 8.2 deprecations (#1158)
Browse files Browse the repository at this point in the history
Follow up of #1157.
  • Loading branch information
theofidry committed Dec 2, 2023
1 parent 1141bf4 commit e98f2c4
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fixtures/Definition/MethodCall/MutableMethodCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MutableMethodCall implements MethodCallInterface
*/
private $arguments;

public function __construct(?ServiceReferenceInterface $caller = null, $method, ?array $arguments = null)
public function __construct(?ServiceReferenceInterface $caller, $method, ?array $arguments = null)
{
$this->caller = $caller;
$this->method = $method;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FakeValueDenormalizer implements ValueDenormalizerInterface
{
use NotCallableTrait;

public function denormalize(FixtureInterface $scope, ?FlagBag $flags = null, $value): void
public function denormalize(FixtureInterface $scope, ?FlagBag $flags, $value): void
{
$this->__call(__FUNCTION__, func_get_args());
}
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
executionOrder="random">

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=8"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
</php>

<listeners>
Expand Down
2 changes: 1 addition & 1 deletion phpunit_symfony.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
>

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=8" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
</php>

<listeners>
Expand Down
2 changes: 1 addition & 1 deletion src/Definition/SpecificationBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class SpecificationBag
*/
private $calls;

public function __construct(?MethodCallInterface $constructor = null, PropertyBag $properties, MethodCallBag $calls)
public function __construct(?MethodCallInterface $constructor, PropertyBag $properties, MethodCallBag $calls)
{
$this->constructor = $constructor;
$this->properties = $properties;
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Resolver/ResolvingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(?string $key = null)
* Returns the existing instance if is an object or create a new one otherwise. It also ensure that the key will be
* added also it won't increment the counter if already present.
*/
public static function createFrom(?self $resolving = null, string $key): self
public static function createFrom(?self $resolving, string $key): self
{
$instance = $resolving ?? new self();
if (false === $instance->has($key)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function testIfResolutionResultsInMultipleParametersBeingResolvedThenThey
/**
* @dataProvider provideContexts
*/
public function testTheContextPassedToTheInjectedResolverIsAlwaysValid(?ResolvingContext $context = null, ResolvingContext $expected): void
public function testTheContextPassedToTheInjectedResolverIsAlwaysValid(?ResolvingContext $context, ResolvingContext $expected): void
{
$array = [
$val1 = 'foo',
Expand Down

0 comments on commit e98f2c4

Please sign in to comment.