8000 [Console][Form][FrameworkBundle][HttpKernel][PropertyInfo][Validator][WebProfilerBundle] Remove optional before required param by HypeMC · Pull Request #51778 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console][Form][FrameworkBundle][HttpKernel][PropertyInfo][Validator][WebProfilerBundle] Remove optional before required param #51778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/expected-missing-return-types.diff
Original file line number Diff line number Diff line change
Expand Up @@ -13166,8 +13166,8 @@ diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.p
@@ -127,5 +127,5 @@ interface ExecutionContextInterface
* @return void
*/
- public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath);
+ public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath): void;
- public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath);
+ public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath): void;

/**
@@ -136,5 +136,5 @@ interface ExecutionContextInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AutowiredServices
private EventDispatcherInterface $dispatcher;
private CacheItemPoolInterface $cachePool;

public function __construct(Reader $annotationReader = null, EventDispatcherInterface $dispatcher, CacheItemPoolInterface $cachePool)
public function __construct(?Reader $annotationReader, EventDispatcherInterface $dispatcher, CacheItemPoolInterface $cachePool)
{
$this->annotationReader = $annotationReader;
$this->dispatcher = $dispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ProfilerController
private ?ContentSecurityPolicyHandler $cspHandler;
private ?string $baseDir;

public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, Environment $twig, array $templates, ContentSecurityPolicyHandler $cspHandler = null, string $baseDir = null)
public function __construct(UrlGeneratorInterface $generator, ?Profiler $profiler, Environment $twig, array $templates, ContentSecurityPolicyHandler $cspHandler = null, string $baseDir = null)
{
$this->generator = $generator;
$this->profiler = $profiler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RouterController
*/
private iterable $expressionLanguageProviders;

public function __construct(Profiler $profiler = null, Environment $twig, UrlMatcherInterface $matcher = null, RouteCollection $routes = null, iterable $expressionLanguageProviders = [])
public function __construct(?Profiler $profiler, Environment $twig, UrlMatcherInterface $matcher = null, RouteCollection $routes = null, iterable $expressionLanguageProviders = [])
{
$this->profiler = $profiler;
$this->twig = $twig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testIsGithubActionEnvironment()
/**
* @dataProvider annotationsFormatProvider
*/
public function testAnnotationsFormat(string $type, string $message, string $file = null, int $line = null, int $col = null, string $expected)
public function testAnnotationsFormat(string $type, string $message, ?string $file, ?int $line, ?int $col, string $expected)
{
$reporter = new GithubActionReporter($buffer = new BufferedOutput());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private function &recursiveBuildPreliminaryFormTree(FormInterface $form, array &
return $output;
}

private function &recursiveBuildFinalFormTree(FormInterface $form = null, FormView $view, array &$outputByHash): array
private function &recursiveBuildFinalFormTree(?FormInterface $form, FormView $view, array &$outputByHash): array
{
$viewHash = spl_object_hash($view);
$formHash = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
*
* @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported
*/
public function __construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null)
public function __construct(?SurrogateInterface $surrogate, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null)
{
$this->surrogate = $surrogate;
$this->inlineStrategy = $inlineStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function setUp(): void
/**
* @dataProvider typesProvider
*/
public function testExtract($property, array $type = null, $shortDescription, $longDescription)
public function testExtract($property, ?array $type, $shortDescription, $longDescription)
{
$this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
$this->assertSame($shortDescription, $this->extractor->getShortDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
Expand Down Expand Up @@ -131,7 +131,7 @@ public static function typesProvider()
/**
* @dataProvider provideCollectionTypes
*/
public function testExtractCollection($property, array $type = null, $shortDescription, $longDescription)
public function testExtractCollection($property, ?array $type, $shortDescription, $longDescription)
{
$this->testExtract($property, $type, $shortDescription, $longDescription);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct(ValidatorInterface $validator, mixed $root, Translat
$this->cachedObjectsRefs = new \SplObjectStorage();
}

public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath): void
public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath): void
{
$this->value = $value;
$this->object = $object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function getObject(): ?object;
*
* @return void
*/
public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath);
public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath);

/**
* Warning: Should not be called by user code, to be used by the validator engine only.
Expand Down
0