Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d276b1

Browse filesBrowse files
[Form] backport type fixes
1 parent 2576663 commit 6d276b1
Copy full SHA for 6d276b1

File tree

Expand file treeCollapse file tree

4 files changed

+16
-18
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+16
-18
lines changed

‎src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ public function getDecoratedFactory()
8484
/**
8585
* {@inheritdoc}
8686
*
87-
* @param callable|Cache\ChoiceValue|null $value The callable or static option for
88-
* generating the choice values
89-
* @param callable|Cache\ChoiceFilter|null $filter The callable or static option for
90-
* filtering the choices
87+
* @param callable|string|Cache\ChoiceValue|null $value The callable or static option for
88+
* generating the choice values
89+
* @param callable|string|Cache\ChoiceFilter|null $filter The callable or static option for
90+
* filtering the choices
9191
*/
9292
public function createListFromChoices(iterable $choices, $value = null/*, $filter = null*/)
9393
{
@@ -129,12 +129,12 @@ public function createListFromChoices(iterable $choices, $value = null/*, $filte
129129
*
130130
* @param ChoiceLoaderInterface|Cache\ChoiceLoader $loader The loader or static loader to load
131131
* the choices lazily
132-
* @param callable|Cache\ChoiceValue|null $value The callable or static option for
132+
* @param callable|string|Cache\ChoiceValue|null $value The callable or static option for
133133
* generating the choice values
134-
* @param callable|Cache\ChoiceFilter|null $filter The callable or static option for
134+
* @param callable|string|Cache\ChoiceFilter|null $filter The callable or static option for
135135
* filtering the choices
136136
*/
137-
public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/*, $filter = null*/)
137+
public function createListFromLoader($loader, $value = null/*, $filter = null*/)
138138
{
139139
$filter = \func_num_args() > 2 ? func_get_arg(2) : null;
140140

@@ -174,11 +174,11 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
174174
/**
175175
* {@inheritdoc}
176176
*
177-
* @param array|callable|Cache\PreferredChoice|null $preferredChoices The preferred choices
178-
* @param callable|false|Cache\ChoiceLabel|null $label The option or static option generating the choice labels
179-
* @param callable|Cache\ChoiceFieldName|null $index The option or static option generating the view indices
180-
* @param callable|Cache\GroupBy|null $groupBy The option or static option generating the group names
181-
* @param array|callable|Cache\ChoiceAttr|null $attr The option or static option generating the HTML attributes
177+
* @param array|callable|string|Cache\PreferredChoice|null $preferredChoices The preferred choices
178+
* @param callable|false|string|Cache\ChoiceLabel|null $label The option or static option generating the choice labels
179+
* @param callable|string|Cache\ChoiceFieldName|null $index The option or static option generating the view indices
180+
* @param callable|string|Cache\GroupBy|null $groupBy The option or static option generating the group names
181+
* @param array|callable|string|Cache\ChoiceAttr|null $attr The option or static option generating the HTML attributes
182182
*/
183183
public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null)
184184
{

‎src/Symfony/Component/Form/Console/Descriptor/Descriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Console/Descriptor/Descriptor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ abstract class Descriptor implements DescriptorInterface
4343
/**
4444
* {@inheritdoc}
4545
*/
46-
public function describe(OutputInterface $output, $object, array $options = [])
46+
public function describe(OutputInterface $output, ?object $object, array $options = [])
4747
{
4848
$this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output);
4949

‎src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException;
1919
use Symfony\Component\PropertyAccess\PropertyAccess;
2020
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
21+
use Symfony\Component\PropertyAccess\PropertyPathInterface;
2122

2223
/**
2324
* Writes and reads values to/from an object or array using property path.
@@ -84,7 +85,7 @@ public function isWritable($data, FormInterface $form): bool
8485
return null !== $form->getPropertyPath();
8586
}
8687

87-
private function getPropertyValue($data, $propertyPath)
88+
private function getPropertyValue($data, PropertyPathInterface $propertyPath)
8889
{
8990
try {
9091
return $this->propertyAccessor->getValue($data, $propertyPath);

‎src/Symfony/Component/Form/Tests/VersionAwareTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/VersionAwareTest.php
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ trait VersionAwareTest
1515
{
1616
protected static $supportedFeatureSetVersion = 404;
1717

18-
/**
19-
* @param int $requiredFeatureSetVersion
20-
*/
21-
protected function requiresFeatureSet($requiredFeatureSetVersion)
18+
protected function requiresFeatureSet(int $requiredFeatureSetVersion)
2219
{
2320
if ($requiredFeatureSetVersion > static::$supportedFeatureSetVersion) {
2421
$this->markTestSkipped(sprintf('Test requires features from symfony/form %.2f but only version %.2f is supported.', $requiredFeatureSetVersion / 100, static::$supportedFeatureSetVersion / 100));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.