From b8e77792bc0c838650e3d9a3dec20fbc0fe86684 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Wed, 30 Nov 2016 17:57:42 -0500 Subject: [PATCH] Grouping FrameworkBundle upgrade notes --- UPGRADE-3.2.md | 74 ++++++++++++++++++++++++-------------------------- UPGRADE-4.0.md | 72 ++++++++++++++++++++++++------------------------ 2 files changed, 71 insertions(+), 75 deletions(-) diff --git a/UPGRADE-3.2.md b/UPGRADE-3.2.md index f4b043c754..a26ed25773 100644 --- a/UPGRADE-3.2.md +++ b/UPGRADE-3.2.md @@ -6,28 +6,6 @@ BrowserKit * Client HTTP user agent has been changed to 'Symfony BrowserKit' (was 'Symfony2 BrowserKit' before). -FrameworkBundle ---------------- - - * The `doctrine/annotations` dependency has been removed; require it via `composer - require doctrine/annotations` if you are using annotations in your project - * The `symfony/security-core` and `symfony/security-csrf` dependencies have - been removed; require them via `composer require symfony/security-core - symfony/security-csrf` if you depend on them and don't already depend on - `symfony/symfony` - * The `symfony/templating` dependency has been removed; require it via `composer - require symfony/templating` if you depend on it and don't already depend on - `symfony/symfony` - * The `symfony/translation` dependency has been removed; require it via `composer - require symfony/translation` if you depend on it and don't already depend on - `symfony/symfony` - * The `symfony/asset` dependency has been removed; require it via `composer - require symfony/asset` if you depend on it and don't already depend on - `symfony/symfony` - * The `Resources/public/images/*` files have been removed. - * The `Resources/public/css/*.css` files have been removed (they are now inlined - in TwigBundle). - Console ------- @@ -72,25 +50,26 @@ Form FrameworkBundle --------------- + * The `doctrine/annotations` dependency has been removed; require it via `composer + require doctrine/annotations` if you are using annotations in your project + * The `symfony/security-core` and `symfony/security-csrf` dependencies have + been removed; require them via `composer require symfony/security-core + symfony/security-csrf` if you depend on them and don't already depend on + `symfony/symfony` + * The `symfony/templating` dependency has been removed; require it via `composer + require symfony/templating` if you depend on it and don't already depend on + `symfony/symfony` + * The `symfony/translation` dependency has been removed; require it via `composer + require symfony/translation` if you depend on it and don't already depend on + `symfony/symfony` + * The `symfony/asset` dependency has been removed; require it via `composer + require symfony/asset` if you depend on it and don't already depend on + `symfony/symfony` + * The `Resources/public/images/*` files have been removed. + * The `Resources/public/css/*.css` files have been removed (they are now inlined + in TwigBundle). * The service `serializer.mapping.cache.doctrine.apc` is deprecated. APCu should now be automatically used when available. - -HttpKernel ----------- - - * `DataCollector::varToString()` is deprecated and will be removed in Symfony - 4.0. Use the `cloneVar()` method instead. - - * Surrogate name in a `Surrogate-Capability` HTTP request header has been changed to 'symfony'. - - Before: - ``` - Surrogate-Capability: symfony2="ESI/1.0" - ``` - - After: - ``` - Surrogate-Capability: symfony="ESI/1.0" ``` HttpFoundation @@ -116,6 +95,23 @@ HttpFoundation - `isInvalid`/`isSuccessful`/`isRedirection`/`isClientError`/`isServerError` - `isOk`/`isForbidden`/`isNotFound`/`isRedirect`/`isEmpty` +HttpKernel +---------- + + * `DataCollector::varToString()` is deprecated and will be removed in Symfony + 4.0. Use the `cloneVar()` method instead. + + * Surrogate name in a `Surrogate-Capability` HTTP request header has been changed to 'symfony'. + + Before: + ``` + Surrogate-Capability: symfony2="ESI/1.0" + ``` + + After: + ``` + Surrogate-Capability: symfony="ESI/1.0" + TwigBridge ---------- diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 483b7e6ed1..d018136932 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -182,6 +182,42 @@ TwigBridge * The possibility to inject the Form Twig Renderer into the form extension has been removed. Inject it into the `TwigRendererEngine` instead. +Validator +--------- + + * The `DateTimeValidator::PATTERN` constant was removed. + + * `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in + favor of `Test\ConstraintValidatorTestCase`. + + Before: + + ```php + // ... + use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; + + class MyCustomValidatorTest extends AbstractConstraintValidatorTest + { + // ... + } + ``` + + After: + + ```php + // ... + use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + + class MyCustomValidatorTest extends ConstraintValidatorTestCase + { + // ... + } + ``` + + * The default value of the strict option of the `Choice` Constraint has been + changed to `true` as of 4.0. If you need the the previous behaviour ensure to + set the option to `false`. + Yaml ---- @@ -273,39 +309,3 @@ Yaml the `!php/object` tag. * Duplicate mapping keys lead to a `ParseException`. - -Validator ---------- - - * The `DateTimeValidator::PATTERN` constant was removed. - - * `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in - favor of `Test\ConstraintValidatorTestCase`. - - Before: - - ```php - // ... - use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; - - class MyCustomValidatorTest extends AbstractConstraintValidatorTest - { - // ... - } - ``` - - After: - - ```php - // ... - use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; - - class MyCustomValidatorTest extends ConstraintValidatorTestCase - { - // ... - } - ``` - - * The default value of the strict option of the `Choice` Constraint has been - changed to `true` as of 4.0. If you need the the previous behaviour ensure to - set the option to `false`.