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 2e8eed8

Browse filesBrowse files
committed
minor #42013 [Form] backport type fixes (nicolas-grekas)
This PR was merged into the 5.2 branch. Discussion ---------- [Form] backport type fixes | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Backported from #41998 Commits ------- 75691c6 [Form] backport type fixes
2 parents d78e3e5 + 75691c6 commit 2e8eed8
Copy full SHA for 2e8eed8

File tree

Expand file treeCollapse file tree

3 files changed

+12
-20
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-20
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
+9-15Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ 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 mixed $value
88+
* @param mixed $filter
9189
*/
9290
public function createListFromChoices(iterable $choices, $value = null/*, $filter = null*/)
9391
{
@@ -127,12 +125,8 @@ public function createListFromChoices(iterable $choices, $value = null/*, $filte
127125
/**
128126
* {@inheritdoc}
129127
*
130-
* @param ChoiceLoaderInterface|Cache\ChoiceLoader $loader The loader or static loader to load
131-
* the choices lazily
132-
* @param callable|Cache\ChoiceValue|null $value The callable or static option for
133-
* generating the choice values
134-
* @param callable|Cache\ChoiceFilter|null $filter The callable or static option for
135-
* filtering the choices
128+
* @param mixed $value
129+
* @param mixed $filter
136130
*/
137131
public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/*, $filter = null*/)
138132
{
@@ -174,11 +168,11 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
174168
/**
175169
* {@inheritdoc}
176170
*
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
171+
* @param mixed $preferredChoices
172+
* @param mixed $label
173+
* @param mixed $index
174+
* @param mixed $groupBy
175+
* @param mixed $attr
182176
*/
183177
public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null)
184178
{

‎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.