Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit33f3400

Browse files
committed
[Form] removed deprecated features
1 parent582f3a3 commit33f3400

File tree

44 files changed

+28
-2824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+28
-2824
lines changed

‎src/Symfony/Bridge/Twig/Extension/FormExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
useSymfony\Bridge\Twig\TokenParser\FormThemeTokenParser;
1515
useSymfony\Bridge\Twig\Form\TwigRendererInterface;
16-
useSymfony\Component\Form\Extension\Core\View\ChoiceView;
16+
useSymfony\Component\Form\ChoiceList\View\ChoiceView;
1717

1818
/**
1919
* FormExtension extends Twig with form capabilities.

‎src/Symfony/Component/Form/ButtonBuilder.php‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -378,23 +378,6 @@ public function setByReference($byReference)
378378
thrownewBadMethodCallException('Buttons do not support data mapping.');
379379
}
380380

381-
/**
382-
* Unsupported method.
383-
*
384-
* This method should not be invoked.
385-
*
386-
* @param bool $virtual
387-
*
388-
* @throws BadMethodCallException
389-
*
390-
* @deprecated since version 2.3, to be removed in 3.0. Use
391-
* {@link setInheritData()} instead.
392-
*/
393-
publicfunctionsetVirtual($virtual)
394-
{
395-
thrownewBadMethodCallException('Buttons cannot be virtual.');
396-
}
397-
398381
/**
399382
* Unsupported method.
400383
*
@@ -587,21 +570,6 @@ public function getByReference()
587570
returnfalse;
588571
}
589572

590-
/**
591-
* Unsupported method.
592-
*
593-
* @return bool Always returns false.
594-
*
595-
* @deprecated since version 2.3, to be removed in 3.0.
596-
* Use {@link getInheritData()} instead.
597-
*/
598-
publicfunctiongetVirtual()
599-
{
600-
@trigger_error('The'.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\FormConfigBuilder::getInheritData method instead.',E_USER_DEPRECATED);
601-
602-
returnfalse;
603-
}
604-
605573
/**
606574
* Unsupported method.
607575
*

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
useSymfony\Component\Form\ChoiceList\ArrayChoiceList;
1616
useSymfony\Component\Form\ChoiceList\ChoiceListInterface;
1717
useSymfony\Component\Form\ChoiceList\LazyChoiceList;
18-
useSymfony\Component\Form\ChoiceList\LegacyChoiceListAdapter;
1918
useSymfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
2019
useSymfony\Component\Form\ChoiceList\View\ChoiceGroupView;
2120
useSymfony\Component\Form\ChoiceList\View\ChoiceListView;
2221
useSymfony\Component\Form\ChoiceList\View\ChoiceView;
23-
useSymfony\Component\Form\Extension\Core\View\ChoiceViewasLegacyChoiceView;
2422

2523
/**
2624
* Default implementation of {@link ChoiceListFactoryInterface}.
@@ -65,23 +63,6 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
6563
*/
6664
publicfunctioncreateView(ChoiceListInterface$list,$preferredChoices =null,$label =null,$index =null,$groupBy =null,$attr =null)
6765
{
68-
// Backwards compatibility
69-
if ($listinstanceof LegacyChoiceListAdapter &&empty($preferredChoices)
70-
&&null ===$label &&null ===$index &&null ===$groupBy &&null ===$attr) {
71-
$mapToNonLegacyChoiceView =function (LegacyChoiceView &$choiceView) {
72-
$choiceView =newChoiceView($choiceView->data,$choiceView->value,$choiceView->label);
73-
};
74-
75-
$adaptedList =$list->getAdaptedList();
76-
77-
$remainingViews =$adaptedList->getRemainingViews();
78-
$preferredViews =$adaptedList->getPreferredViews();
79-
array_walk_recursive($remainingViews,$mapToNonLegacyChoiceView);
80-
array_walk_recursive($preferredViews,$mapToNonLegacyChoiceView);
81-
82-
returnnewChoiceListView($remainingViews,$preferredViews);
83-
}
84-
8566
$preferredViews =array();
8667
$otherViews =array();
8768
$choices =$list->getChoices();

‎src/Symfony/Component/Form/ChoiceList/LegacyChoiceListAdapter.php‎

Lines changed: 0 additions & 144 deletions
This file was deleted.

‎src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php‎

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespaceSymfony\Component\Form\Extension\Core\View;
12+
namespaceSymfony\Component\Form\ChoiceList\View;
1313

1414
/**
1515
* Represents a choice in templates.
1616
*
1717
* @author Bernhard Schussek <bschussek@gmail.com>
18-
*
19-
* @deprecated since version 2.7, to be removed in 3.0.
20-
* Use {@link \Symfony\Component\Form\ChoiceList\View\ChoiceView} instead.
2118
*/
2219
class ChoiceView
2320
{
@@ -42,32 +39,6 @@ class ChoiceView
4239
*/
4340
public$data;
4441

45-
/**
46-
* Creates a new ChoiceView.
47-
*
48-
* @param mixed $data The original choice.
49-
* @param string $value The view representation of the choice.
50-
* @param string $label The label displayed to humans.
51-
*/
52-
publicfunction__construct($data,$value,$label)
53-
{
54-
$this->data =$data;
55-
$this->value =$value;
56-
$this->label =$label;
57-
}
58-
}
59-
60-
namespaceSymfony\Component\Form\ChoiceList\View;
61-
62-
useSymfony\Component\Form\Extension\Core\View\ChoiceViewasLegacyChoiceView;
63-
64-
/**
65-
* Represents a choice in templates.
66-
*
67-
* @author Bernhard Schussek <bschussek@gmail.com>
68-
*/
69-
class ChoiceViewextends LegacyChoiceView
70-
{
7142
/**
7243
* Additional attributes for the HTML tag.
7344
*
@@ -85,8 +56,9 @@ class ChoiceView extends LegacyChoiceView
8556
*/
8657
publicfunction__construct($data,$value,$label,array$attr =array())
8758
{
88-
parent::__construct($data,$value,$label);
89-
59+
$this->data =$data;
60+
$this->value =$value;
61+
$this->label =$label;
9062
$this->attr =$attr;
9163
}
9264
}

‎src/Symfony/Component/Form/Exception/AlreadyBoundException.php‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎src/Symfony/Component/Form/Exception/AlreadySubmittedException.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
*
1818
* @author Bernhard Schussek <bschussek@gmail.com>
1919
*/
20-
class AlreadySubmittedExceptionextendsAlreadyBoundException
20+
class AlreadySubmittedExceptionextendsLogicException
2121
{
2222
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp