Updated upgrade instructions.
This commit is contained in:
parent
7e21dd1c57
commit
6e90c508d6
|
@ -94,7 +94,7 @@
|
||||||
```
|
```
|
||||||
* The custom factories for the firewall configuration are now
|
* The custom factories for the firewall configuration are now
|
||||||
registered during the build method of bundles instead of being registered
|
registered during the build method of bundles instead of being registered
|
||||||
by the end-user. This means that you will you need to remove the 'factories'
|
by the end-user. This means that you will you need to remove the 'factories'
|
||||||
keys in your security configuration.
|
keys in your security configuration.
|
||||||
|
|
||||||
* The Firewall listener is now registered after the Router listener. This
|
* The Firewall listener is now registered after the Router listener. This
|
||||||
|
@ -372,29 +372,29 @@
|
||||||
return isset($options['widget']) && 'single_text' === $options['widget'] ? 'text' : 'choice';
|
return isset($options['widget']) && 'single_text' === $options['widget'] ? 'text' : 'choice';
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* The methods `getDefaultOptions()` and `getAllowedOptionValues()` of form
|
* The methods `getDefaultOptions()` and `getAllowedOptionValues()` of form
|
||||||
types no longer receive an option array.
|
types no longer receive an option array.
|
||||||
|
|
||||||
You can specify options that depend on other options using closures instead.
|
You can specify options that depend on other options using closures instead.
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||
|
|
||||||
```
|
```
|
||||||
public function getDefaultOptions(array $options)
|
public function getDefaultOptions(array $options)
|
||||||
{
|
{
|
||||||
$defaultOptions = array();
|
$defaultOptions = array();
|
||||||
|
|
||||||
if ($options['multiple']) {
|
if ($options['multiple']) {
|
||||||
$defaultOptions['empty_data'] = array();
|
$defaultOptions['empty_data'] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $defaultOptions;
|
return $defaultOptions;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
After:
|
After:
|
||||||
|
|
||||||
```
|
```
|
||||||
public function getDefaultOptions()
|
public function getDefaultOptions()
|
||||||
{
|
{
|
||||||
|
@ -405,7 +405,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The second argument `$previousValue` does not have to be specified if not
|
The second argument `$previousValue` does not have to be specified if not
|
||||||
needed.
|
needed.
|
||||||
|
|
||||||
|
@ -425,6 +425,9 @@
|
||||||
(or any other of the BIND events). In case you used the CallbackValidator
|
(or any other of the BIND events). In case you used the CallbackValidator
|
||||||
class, you should now pass the callback directly to `addEventListener`.
|
class, you should now pass the callback directly to `addEventListener`.
|
||||||
|
|
||||||
|
* Core translation messages are changed. Dot is added at the end of each message.
|
||||||
|
Overwritten core translations should be fixed if any. More info [here](https://github.com/symfony/symfony/issues/3379).
|
||||||
|
|
||||||
### Session
|
### Session
|
||||||
|
|
||||||
* Flash messages now return an array based on their type. The old method is
|
* Flash messages now return an array based on their type. The old method is
|
||||||
|
|
Reference in New Issue