Skip to content

Commit e98f2c4

Browse files
authored
fix: Address the PHP 8.2 deprecations (#1158)
Follow up of #1157.
1 parent 1141bf4 commit e98f2c4

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

fixtures/Definition/MethodCall/MutableMethodCall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MutableMethodCall implements MethodCallInterface
3333
*/
3434
private $arguments;
3535

36-
public function __construct(?ServiceReferenceInterface $caller = null, $method, ?array $arguments = null)
36+
public function __construct(?ServiceReferenceInterface $caller, $method, ?array $arguments = null)
3737
{
3838
$this->caller = $caller;
3939
$this->method = $method;

fixtures/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/Value/FakeValueDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class FakeValueDenormalizer implements ValueDenormalizerInterface
2222
{
2323
use NotCallableTrait;
2424

25-
public function denormalize(FixtureInterface $scope, ?FlagBag $flags = null, $value): void
25+
public function denormalize(FixtureInterface $scope, ?FlagBag $flags, $value): void
2626
{
2727
$this->__call(__FUNCTION__, func_get_args());
2828
}

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
executionOrder="random">
1919

2020
<php>
21-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=8"/>
21+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
2222
</php>
2323

2424
<listeners>

phpunit_symfony.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
>
2020

2121
<php>
22-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=8" />
22+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
2323
</php>
2424

2525
<listeners>

src/Definition/SpecificationBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class SpecificationBag
3434
*/
3535
private $calls;
3636

37-
public function __construct(?MethodCallInterface $constructor = null, PropertyBag $properties, MethodCallBag $calls)
37+
public function __construct(?MethodCallInterface $constructor, PropertyBag $properties, MethodCallBag $calls)
3838
{
3939
$this->constructor = $constructor;
4040
$this->properties = $properties;

src/Generator/Resolver/ResolvingContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(?string $key = null)
3737
* Returns the existing instance if is an object or create a new one otherwise. It also ensure that the key will be
3838
* added also it won't increment the counter if already present.
3939
*/
40-
public static function createFrom(?self $resolving = null, string $key): self
40+
public static function createFrom(?self $resolving, string $key): self
4141
{
4242
$instance = $resolving ?? new self();
4343
if (false === $instance->has($key)) {

tests/Generator/Resolver/Parameter/Chainable/ArrayParameterResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function testIfResolutionResultsInMultipleParametersBeingResolvedThenThey
203203
/**
204204
* @dataProvider provideContexts
205205
*/
206-
public function testTheContextPassedToTheInjectedResolverIsAlwaysValid(?ResolvingContext $context = null, ResolvingContext $expected): void
206+
public function testTheContextPassedToTheInjectedResolverIsAlwaysValid(?ResolvingContext $context, ResolvingContext $expected): void
207207
{
208208
$array = [
209209
$val1 = 'foo',

0 commit comments

Comments
 (0)