Skip to content

[2.8] Modify 2.8 upgrade doc - key option is deprecated. #23826

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

Closed
wants to merge 2 commits into from
Closed
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
89 changes: 89 additions & 0 deletions UPGRADE-2.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,95 @@ Security

* The `VoterInterface::supportsClass` and `supportsAttribute` methods were
deprecated and will be removed from the interface in 3.0.

* The the `key` setting of `anonymous`, `remember_me` and `http_digest`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: The the

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 4879eb4

is deprecated, and will be removed in 3.0. Use `secret` instead.
Copy link
Contributor

@sstok sstok Aug 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the `secret` option instead.

Oh wait, the Bundle upgrade guide doesn't mention this :) better to wait for a merge to decide.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to make this change, but I'll wait for someone else to confirm that it's needed, then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a config example showing the difference. You can borrow the one from #16493.

Copy link
Author

@sampart sampart Aug 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okaydoke, and thanks for the link. Added in commit 84a6d70 now.


Before:

```yaml
security:
# ...
firewalls:
default:
# ...
anonymous: { key: "%secret%" }
remember_me:
key: "%secret%"
http_digest:
key: "%secret%"
```

```xml
<!-- ... -->
<config>
<!-- ... -->

<firewall>
<!-- ... -->

<anonymous key="%secret%"/>
<remember-me key="%secret%"/>
<http-digest key="%secret%"/>
</firewall>
</config>
```

```php
// ...
$container->loadFromExtension('security', array(
// ...
'firewalls' => array(
// ...
'anonymous' => array('key' => '%secret%'),
'remember_me' => array('key' => '%secret%'),
'http_digest' => array('key' => '%secret%'),
),
));
```

After:

```yaml
security:
# ...
firewalls:
default:
# ...
anonymous: { secret: "%secret%" }
remember_me:
secret: "%secret%"
http_digest:
secret: "%secret%"
```

```xml
<!-- ... -->
<config>
<!-- ... -->

<firewall>
<!-- ... -->

<anonymous secret="%secret%"/>
<remember-me secret="%secret%"/>
<http-digest secret="%secret%"/>
</firewall>
</config>
```

```php
// ...
$container->loadFromExtension('security', array(
// ...
'firewalls' => array(
// ...
'anonymous' => array('secret' => '%secret%'),
'remember_me' => array('secret' => '%secret%'),
'http_digest' => array('secret' => '%secret%'),
),
));
```

* The `intention` option is deprecated for all the authentication listeners,
and will be removed in 3.0. Use the `csrf_token_id` option instead.
Expand Down