10000 minor #17405 synchronize 2.7 and 3.0 upgrade files (xabbuh) · symfony/symfony@31aef7b · GitHub
[go: up one dir, main page]

Skip to content

Commit 31aef7b

Browse files
committed
minor #17405 synchronize 2.7 and 3.0 upgrade files (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- synchronize 2.7 and 3.0 upgrade files | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16667 | License | MIT | Doc PR | This is a first step into solving #16667 by checking also the entries from the `UPGRADE-2.7.md` file. Commits ------- 8d5b9d5 synchronize 2.7 and 3.0 upgrade files
2 parents ab43f38 + 8d5b9d5 commit 31aef7b

File tree

1 file changed

+57
-6
lines changed

1 file changed

+57
-6
lines changed

UPGRADE-3.0.md

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ UPGRADE FROM 2.x to 3.0
1919
* The `DebugUniversalClassLoader` class has been removed in favor of
2020
`DebugClassLoader`. The difference is that the constructor now takes a
2121
loader to wrap.
22+
```
23+
24+
### Config
25+
26+
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` class
27+
was removed in favor of the new `getPath()` method.
2228
2329
### Console
2430
@@ -99,13 +105,38 @@ UPGRADE FROM 2.x to 3.0
99105
removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
100106
and `Definition::setSynchronized()`.
101107

108+
### DoctrineBridge
109+
110+
* The `property` option of `DoctrineType` was removed in favor of the `choice_label` option.
111+
112+
* The `loader` option of `DoctrineType` was removed. You now have to override the `getLoader()`
113+
method in your custom type.
114+
115+
* The `Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList` was removed in favor
116+
of `Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader`.
117+
118+
* Passing a query builder closure to `ORMQueryBuilderLoader` is not supported anymore.
119+
You should pass resolved query builders only.
120+
121+
Consequently, the arguments `$manager` and `$class` of `ORMQueryBuilderLoader`
122+
have been removed as well.
123+
124+
Note that the `query_builder` option of `DoctrineType` *does* support
125+
closures, but the closure is now resolved in the type instead of in the
126+
loader.
127+
102128
### EventDispatcher
103129

104130
* The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
105131
extends `Symfony\Component\EventDispatcher\EventDispatcherInterface`.
106132

107133
### Form
108134

135+
* The `ChoiceToBooleanArrayTransformer`, `ChoicesToBooleanArrayTransformer`,
136+
`FixRadioInputListener`, and `FixCheckboxInputListener` classes were removed.
137+
138+
* The `choice_list` option of `ChoiceType` was removed.
139+
109140
* The option "precision" was renamed to "scale".
110141

111142
Before:
@@ -271,11 +302,11 @@ UPGRADE FROM 2.x to 3.0
271302
`NumberToLocalizedStringTransformer` were renamed to `ROUND_HALF_EVEN`,
272303
`ROUND_HALF_UP` and `ROUND_HALF_DOWN`.
273304

274-
* The methods `ChoiceListInterface::getIndicesForChoices()` and
275-
`ChoiceListInterface::getIndicesForValues()` were removed. No direct
276-
replacement exists, although in most cases
277-
`ChoiceListInterface::getChoicesForValues()` and
278-
`ChoiceListInterface::getValuesForChoices()` should be sufficient.
305+
* The `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface` was
306+
removed in favor of `Symfony\Component\Form\ChoiceList\ChoiceListInterface`.
307+
308+
* `Symfony\Component\Form\Extension\Core\View\ChoiceView` was removed in favor of
309+
`Symfony\Component\Form\ChoiceList\View\ChoiceView`.
279310

280311
* The interface `Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface`
281312
and all of its implementations were removed. Use the new interface
@@ -544,7 +575,7 @@ UPGRADE FROM 2.x to 3.0
544575

545576
* Some route settings have been renamed:
546577

547-
* The `pattern` setting for a route has been deprecated in favor of `path`
578+
* The `pattern` setting has been removed in favor of `path`
548579
* The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings
549580

550581
Before:
@@ -597,10 +628,23 @@ UPGRADE FROM 2.x to 3.0
597628
the performance gains were minimal and it's hard to replicate the behaviour
598629
of PHP implementation.
599630

631+
* The `getMatcherDumperInstance()` and `getGeneratorDumperInstance()` methods in the
632+
`Symfony\Component\Routing\Router` have been changed from `public` to `protected`.
633+
600634
### Security
601635

602636
* The `Resources/` directory was moved to `Core/Resources/`
603637

638+
### Serializer
639+
640+
* The `setCamelizedAttributes()` method of the
641+
`Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer` and
642+
`Symfony\Component\Serializer\Normalizer\PropertyNormalizer` classes
643+
was removed.
644+
645+
* The `Symfony\Component\Serializer\Exception\Exception` interface was removed
646+
in favor of the new `Symfony\Component\Serializer\Exception\ExceptionInterface`.
647+
604648
### Translator
605649

606650
* The `Translator::setFallbackLocale()` method has been removed in favor of
@@ -665,11 +709,18 @@ UPGRADE FROM 2.x to 3.0
665709

666710
### TwigBundle
667711

712+
* The `Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy` was removed
713+
in favor of `Twig_FileExtensionEscapingStrategy`.
714+
668715
* The `twig:debug` command has been deprecated since Symfony 2.7 and will be
669716
removed in Symfony 3.0. Use the `debug:twig` command instead.
670717

671718
### Validator
672719

720+
* The PHP7-incompatible constraints (`Null`, `True`, `False`) and their related
721+
validators (`NullValidator`, `TrueValidator`, `FalseValidator`) have been
722+
removed in favor of their `Is`-prefixed equivalent.
723+
673724
* The class `Symfony\Component\Validator\Mapping\Cache\ApcCache` has been removed in favor
674725
of `Symfony\Component\Validator\Mapping\Cache\DoctrineCache`.
675726

0 commit comments

Comments
 (0)
0