Skip to content

[Form][Security] update upgrade files with CSRF related option info #17403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions UPGRADE-2.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ All components
Form
----

* The `intention` option was deprecated and will be removed in 3.0 in favor
of the new `csrf_token_id` option.

* The `csrf_provider` option was deprecated and will be removed in 3.0 in favor
of the new `csrf_token_generator` option.

* The "cascade_validation" option was deprecated. Use the "constraints"
option together with the `Valid` constraint instead. Contrary to
"cascade_validation", "constraints" must be set on the respective child forms,
Expand Down Expand Up @@ -203,7 +209,7 @@ Form
* In Symfony 2.7 a small BC break was introduced with the new choices_as_values
option. In order to have the choice values populated to the html value attribute
you had to define the choice_value option. This is now not any more needed.

Before:

```php
Expand All @@ -221,9 +227,9 @@ Form
},
));
```

After (Symfony 2.8+):

```php
$form->add('status', ChoiceType::class, array(
'choices' => array(
Expand Down Expand Up @@ -262,13 +268,13 @@ Form
}
}
```

* The option "options" of the CollectionType has been renamed to "entry_options".
The usage of the option "options" is deprecated and will be removed in Symfony 3.0.

* The option "type" of the CollectionType has been renamed to "entry_type".
The usage of the option "type" is deprecated and will be removed in Symfony 3.0.
As a value for the option you should provide the fully-qualified class name (FQCN)
As a value for the option you should provide the fully-qualified class name (FQCN)
now as well.

* Passing type instances to `Form::add()`, `FormBuilder::add()` and the
Expand Down Expand Up @@ -409,8 +415,8 @@ DependencyInjection
</services>
```

* `Symfony\Component\DependencyInjection\ContainerAware` has been deprecated, use
`Symfony\Component\DependencyInjection\ContainerAwareTrait` or implement
* `Symfony\Component\DependencyInjection\ContainerAware` has been deprecated, use
`Symfony\Component\DependencyInjection\ContainerAwareTrait` or implement
`Symfony\Component\DependencyInjection\ContainerAwareInterface` manually

WebProfiler
Expand Down Expand Up @@ -522,12 +528,18 @@ Security
* The `intention` option is deprecated for all the authentication listeners,
and will be removed in 3.0. Use the `csrf_token_id` option instead.

* The `csrf_provider` option is deprecated for all the authentication listeners,
and will be removed in 3.0. Use the `csrf_token_generator` option instead.

SecurityBundle
--------------

* The `intention` firewall listener setting is deprecated, and will be removed in 3.0.
Use the `csrf_token_id` option instead.

* The `csrf_provider` firewall listener setting is deprecated, and will be removed in 3.0.
Use the `csrf_token_generator` option instead.

Config
------

Expand Down
30 changes: 20 additions & 10 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ UPGRADE FROM 2.x to 3.0
// ...
}
```

* The option "options" of the CollectionType has been renamed to "entry_options".

* The option "type" of the CollectionType has been renamed to "entry_type".
As a value for the option you must provide the fully-qualified class name (FQCN)
now as well.
As a value for the option you must provide the fully-qualified class name (FQCN)
now as well.

* The `FormIntegrationTestCase` and `FormPerformanceTestCase` classes were moved form the `Symfony\Component\Form\Tests` namespace to the `Symfony\Component\Form\Test` namespace.

Expand Down Expand Up @@ -317,8 +317,8 @@ UPGRADE FROM 2.x to 3.0

* The `Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList` class has been removed in
favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`.
* The `TimezoneType::getTimezones()` method was removed. You should not use

* The `TimezoneType::getTimezones()` method was removed. You should not use
this method.

* The `Symfony\Component\Form\ChoiceList\ArrayKeyChoiceList` class has been removed in
Expand Down Expand Up @@ -365,11 +365,11 @@ UPGRADE FROM 2.x to 3.0
}
}
```

* In Symfony 2.7 a small BC break was introduced with the new choices_as_values
option. In order to have the choice values populated to the html value attribute
you had to define the choice_value option. This is now not any more needed.

Before:

```php
Expand All @@ -389,9 +389,9 @@ UPGRADE FROM 2.x to 3.0
},
));
```

After:

```php
$form->add('status', ChoiceType::class, array(
'choices' => array(
Expand All @@ -400,7 +400,7 @@ UPGRADE FROM 2.x to 3.0
'Ignored' => Status::IGNORED,
)
));
```
```

* The `request` service was removed. You must inject the `request_stack`
service instead.
Expand Down Expand Up @@ -774,6 +774,16 @@ UPGRADE FROM 2.x to 3.0
}
```

* The `intention` option was renamed to `csrf_token_id` for all the authentication listeners.

* The `csrf_provider` option was renamed to `csrf_token_generator` for all the authentication listeners.

### SecurityBundle

* The `intention` firewall listener setting was renamed to `csrf_token_id`.

* The `csrf_provider` firewall listener setting was renamed to `csrf_token_generator`.

### Translator

* The `Translator::setFallbackLocale()` method has been removed in favor of
Expand Down