2016-05-05 07:52:44 +01:00
UPGRADE FROM 3.1 to 3.2
=======================
2016-10-07 23:19:14 +01:00
BrowserKit
----------
* Client HTTP user agent has been changed to 'Symfony BrowserKit' (was 'Symfony2 BrowserKit' before).
2016-04-11 14:31:32 +01:00
FrameworkBundle
---------------
2016-09-30 00:48:22 +01:00
* The `doctrine/annotations` dependency has been removed; require it via `composer
require doctrine/annotations` if you are using annotations in your project
2016-09-28 18:11:47 +01:00
* 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`
2016-09-28 16:50:27 +01:00
* 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`
2016-09-28 05:49:39 +01:00
* 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`
2016-09-28 05:29:33 +01:00
* 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`
2016-09-21 17:58:17 +01:00
* The `Resources/public/images/*` files have been removed.
* The `Resources/public/css/*.css` files have been removed (they are now inlined
in TwigBundle).
2016-04-11 14:31:32 +01:00
2016-09-21 15:11:45 +01:00
Console
-------
* Setting unknown style options is deprecated and will throw an exception in
Symfony 4.0.
2016-05-05 07:52:44 +01:00
DependencyInjection
-------------------
* Calling `get()` on a `ContainerBuilder` instance before compiling the
container is deprecated and will throw an exception in Symfony 4.0.
2015-12-31 16:39:30 +00:00
2016-08-26 08:29:50 +01:00
ExpressionLanguage
-------------------
* Passing a `ParserCacheInterface` instance to the `ExpressionLanguage` has been
deprecated and will not be supported in Symfony 4.0. You should use the
`CacheItemPoolInterface` interface instead.
2016-02-01 19:26:57 +00:00
Form
----
* Calling `isValid()` on a `Form` instance before submitting it
is deprecated and will throw an exception in Symfony 4.0.
Before:
```php
if ($form->isValid()) {
// ...
}
```
After:
```php
if ($form->isSubmitted() & & $form->isValid()) {
// ...
}
```
2016-06-29 20:45:06 +01:00
FrameworkBundle
---------------
2016-08-14 14:24:11 +01:00
* 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.
2016-06-29 20:45:06 +01:00
2016-10-07 23:19:14 +01:00
* 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"
```
2016-08-25 13:14:47 +01:00
HttpFoundation
---------------
* Extending the following methods of `Response`
is deprecated (these methods will be `final` in 4.0):
- `setDate` /`getDate`
- `setExpires` /`getExpires`
- `setLastModified` /`getLastModified`
- `setProtocolVersion` /`getProtocolVersion`
- `setStatusCode` /`getStatusCode`
- `setCharset` /`getCharset`
- `setPrivate` /`setPublic`
- `getAge`
- `getMaxAge` /`setMaxAge`
- `setSharedMaxAge`
- `getTtl` /`setTtl`
- `setClientTtl`
- `getEtag` /`setEtag`
- `hasVary` /`getVary`/`setVary`
- `isInvalid` /`isSuccessful`/`isRedirection`/`isClientError`/`isServerError`
- `isOk` /`isForbidden`/`isNotFound`/`isRedirect`/`isEmpty`
2016-11-29 20:18:47 +00:00
Serializer
----------
* Method `AbstractNormalizer::instantiateObject()` will have a 6th `$format = null` argument in Symfony 4.0. Not defining it when overriding the method is deprecated.
2016-10-11 21:49:30 +01:00
TwigBridge
----------
* Deprecated the possibility to inject the Form Twig Renderer into the form
extension. Inject it into the `TwigRendererEngine` instead.
2015-12-31 16:39:30 +00:00
Validator
---------
* `Tests\Constraints\AbstractConstraintValidatorTest` has been deprecated 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
{
// ...
}
```
2016-08-04 13:37:15 +01:00
2016-09-14 23:04:04 +01:00
* Setting the strict option of the `Choice` Constraint to `false` has been
2016-07-01 08:59:41 +01:00
deprecated and the option will be changed to `true` as of 4.0.
```php
// ...
use Symfony\Component\Validator\Constraints as Assert;
class MyEntity
{
/**
* @Assert \Choice(choices={"MR", "MRS"}, strict=true)
*/
private $salutation;
}
```
2016-09-14 23:04:04 +01:00
2016-08-04 13:37:15 +01:00
Yaml
----
2016-08-27 10:58:27 +01:00
* Support for silently ignoring duplicate mapping keys in YAML has been
deprecated and will lead to a `ParseException` in Symfony 4.0.
2016-08-13 19:49:42 +01:00
2016-08-25 07:47:13 +01:00
* Mappings with a colon (`:`) that is not followed by a whitespace are deprecated
and will lead to a `ParseException` in Symfony 4.0 (e.g. `foo:bar` must be
`foo: bar` ).