synchronize 2.7 and 3.0 upgrade files
This commit is contained in:
parent
6a92f4e03f
commit
8d5b9d572a
|
@ -19,6 +19,12 @@ UPGRADE FROM 2.x to 3.0
|
||||||
* The `DebugUniversalClassLoader` class has been removed in favor of
|
* The `DebugUniversalClassLoader` class has been removed in favor of
|
||||||
`DebugClassLoader`. The difference is that the constructor now takes a
|
`DebugClassLoader`. The difference is that the constructor now takes a
|
||||||
loader to wrap.
|
loader to wrap.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Config
|
||||||
|
|
||||||
|
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` class
|
||||||
|
was removed in favor of the new `getPath()` method.
|
||||||
|
|
||||||
### Console
|
### Console
|
||||||
|
|
||||||
|
@ -99,6 +105,26 @@ UPGRADE FROM 2.x to 3.0
|
||||||
removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
|
removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
|
||||||
and `Definition::setSynchronized()`.
|
and `Definition::setSynchronized()`.
|
||||||
|
|
||||||
|
### DoctrineBridge
|
||||||
|
|
||||||
|
* The `property` option of `DoctrineType` was removed in favor of the `choice_label` option.
|
||||||
|
|
||||||
|
* The `loader` option of `DoctrineType` was removed. You now have to override the `getLoader()`
|
||||||
|
method in your custom type.
|
||||||
|
|
||||||
|
* The `Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList` was removed in favor
|
||||||
|
of `Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader`.
|
||||||
|
|
||||||
|
* Passing a query builder closure to `ORMQueryBuilderLoader` is not supported anymore.
|
||||||
|
You should pass resolved query builders only.
|
||||||
|
|
||||||
|
Consequently, the arguments `$manager` and `$class` of `ORMQueryBuilderLoader`
|
||||||
|
have been removed as well.
|
||||||
|
|
||||||
|
Note that the `query_builder` option of `DoctrineType` *does* support
|
||||||
|
closures, but the closure is now resolved in the type instead of in the
|
||||||
|
loader.
|
||||||
|
|
||||||
### EventDispatcher
|
### EventDispatcher
|
||||||
|
|
||||||
* The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
|
* The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
|
||||||
|
@ -106,6 +132,11 @@ UPGRADE FROM 2.x to 3.0
|
||||||
|
|
||||||
### Form
|
### Form
|
||||||
|
|
||||||
|
* The `ChoiceToBooleanArrayTransformer`, `ChoicesToBooleanArrayTransformer`,
|
||||||
|
`FixRadioInputListener`, and `FixCheckboxInputListener` classes were removed.
|
||||||
|
|
||||||
|
* The `choice_list` option of `ChoiceType` was removed.
|
||||||
|
|
||||||
* The option "precision" was renamed to "scale".
|
* The option "precision" was renamed to "scale".
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||
|
@ -271,11 +302,11 @@ UPGRADE FROM 2.x to 3.0
|
||||||
`NumberToLocalizedStringTransformer` were renamed to `ROUND_HALF_EVEN`,
|
`NumberToLocalizedStringTransformer` were renamed to `ROUND_HALF_EVEN`,
|
||||||
`ROUND_HALF_UP` and `ROUND_HALF_DOWN`.
|
`ROUND_HALF_UP` and `ROUND_HALF_DOWN`.
|
||||||
|
|
||||||
* The methods `ChoiceListInterface::getIndicesForChoices()` and
|
* The `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface` was
|
||||||
`ChoiceListInterface::getIndicesForValues()` were removed. No direct
|
removed in favor of `Symfony\Component\Form\ChoiceList\ChoiceListInterface`.
|
||||||
replacement exists, although in most cases
|
|
||||||
`ChoiceListInterface::getChoicesForValues()` and
|
* `Symfony\Component\Form\Extension\Core\View\ChoiceView` was removed in favor of
|
||||||
`ChoiceListInterface::getValuesForChoices()` should be sufficient.
|
`Symfony\Component\Form\ChoiceList\View\ChoiceView`.
|
||||||
|
|
||||||
* The interface `Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface`
|
* The interface `Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface`
|
||||||
and all of its implementations were removed. Use the new interface
|
and all of its implementations were removed. Use the new interface
|
||||||
|
@ -544,7 +575,7 @@ UPGRADE FROM 2.x to 3.0
|
||||||
|
|
||||||
* Some route settings have been renamed:
|
* Some route settings have been renamed:
|
||||||
|
|
||||||
* The `pattern` setting for a route has been deprecated in favor of `path`
|
* The `pattern` setting has been removed in favor of `path`
|
||||||
* The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings
|
* The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||
|
@ -597,10 +628,23 @@ UPGRADE FROM 2.x to 3.0
|
||||||
the performance gains were minimal and it's hard to replicate the behaviour
|
the performance gains were minimal and it's hard to replicate the behaviour
|
||||||
of PHP implementation.
|
of PHP implementation.
|
||||||
|
|
||||||
|
* The `getMatcherDumperInstance()` and `getGeneratorDumperInstance()` methods in the
|
||||||
|
`Symfony\Component\Routing\Router` have been changed from `public` to `protected`.
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
* The `Resources/` directory was moved to `Core/Resources/`
|
* The `Resources/` directory was moved to `Core/Resources/`
|
||||||
|
|
||||||
|
### Serializer
|
||||||
|
|
||||||
|
* The `setCamelizedAttributes()` method of the
|
||||||
|
`Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer` and
|
||||||
|
`Symfony\Component\Serializer\Normalizer\PropertyNormalizer` classes
|
||||||
|
was removed.
|
||||||
|
|
||||||
|
* The `Symfony\Component\Serializer\Exception\Exception` interface was removed
|
||||||
|
in favor of the new `Symfony\Component\Serializer\Exception\ExceptionInterface`.
|
||||||
|
|
||||||
### Translator
|
### Translator
|
||||||
|
|
||||||
* The `Translator::setFallbackLocale()` method has been removed in favor of
|
* The `Translator::setFallbackLocale()` method has been removed in favor of
|
||||||
|
@ -665,11 +709,18 @@ UPGRADE FROM 2.x to 3.0
|
||||||
|
|
||||||
### TwigBundle
|
### TwigBundle
|
||||||
|
|
||||||
|
* The `Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy` was removed
|
||||||
|
in favor of `Twig_FileExtensionEscapingStrategy`.
|
||||||
|
|
||||||
* The `twig:debug` command has been deprecated since Symfony 2.7 and will be
|
* The `twig:debug` command has been deprecated since Symfony 2.7 and will be
|
||||||
removed in Symfony 3.0. Use the `debug:twig` command instead.
|
removed in Symfony 3.0. Use the `debug:twig` command instead.
|
||||||
|
|
||||||
### Validator
|
### Validator
|
||||||
|
|
||||||
|
* The PHP7-incompatible constraints (`Null`, `True`, `False`) and their related
|
||||||
|
validators (`NullValidator`, `TrueValidator`, `FalseValidator`) have been
|
||||||
|
removed in favor of their `Is`-prefixed equivalent.
|
||||||
|
|
||||||
* The class `Symfony\Component\Validator\Mapping\Cache\ApcCache` has been removed in favor
|
* The class `Symfony\Component\Validator\Mapping\Cache\ApcCache` has been removed in favor
|
||||||
of `Symfony\Component\Validator\Mapping\Cache\DoctrineCache`.
|
of `Symfony\Component\Validator\Mapping\Cache\DoctrineCache`.
|
||||||
|
|
||||||
|
|
Reference in New Issue