Skip to content

Missing deprecation+bc-layer for renaming intention to csrf_token_id in SecurityBundle #16720

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
nicolas-grekas opened this issue Nov 28, 2015 · 3 comments

Comments

@nicolas-grekas
Copy link
Member

"intention" is renamed to "csrf_token_id", but not in SecurityBunde.
This went unoticed because the related deprecation triggered by the Form component is hidden for insulated http tests...
See #16692 where intention is removed altogether.

@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2015

@nicolas-grekas You already added a deprecation trigger in #16704. Do you have something else in mind here?

@nicolas-grekas
Copy link
Member Author

Checkout 2.8, remove insulation in CsrfFormLoginTest::testFormLoginAndLogoutWithCsrfTokens and run iteration #0 of it:

PHPUnit 4.8.18 by Sebastian Bergmann and contributors.

Testing src/Symfony/Bundle/SecurityBundle/

Remaining deprecation triggered by Symfony\Bundle\SecurityBundle\Tests\Functional\CsrfFormLoginTest::testFormLoginAndLogoutWithCsrfTokens:
The form option "intention" is deprecated since version 2.8 and will be removed in 3.0. Use "csrf_token_id" instead.
Stack trace:
#0 src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php(127): trigger_error()
#1 src/Symfony/Component/OptionsResolver/OptionsResolver.php(859): Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension->Symfony\Component\Form\Extension\Csrf\Type\{closure}()
#2 src/Symfony/Component/OptionsResolver/OptionsResolver.php(791): Symfony\Component\OptionsResolver\OptionsResolver->offsetGet()
#3 src/Symfony/Component/Form/ResolvedFormType.php(156): Symfony\Component\OptionsResolver\OptionsResolver->resolve()
#4 src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php(91): Symfony\Component\Form\ResolvedFormType->createBuilder()
#5 src/Symfony/Component/Form/FormFactory.php(119): Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->createBuilder()
#6 src/Symfony/Component/Form/FormFactory.php(96): Symfony\Component\Form\FormFactory->createNamedBuilder()
#7 src/Symfony/Component/Form/FormFactory.php(40): Symfony\Component\Form\FormFactory->createBuilder()
#8 src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php(22): Symfony\Component\Form\FormFactory->create()
#9 [internal function]: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Controller\LoginController->loginAction()
#10 src/Symfony/Component/HttpKernel/HttpKernel.php(139): call_user_func_array()
#11 src/Symfony/Component/HttpKernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#12 src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(69): Symfony\Component\HttpKernel\HttpKernel->handle()
#13 src/Symfony/Component/HttpKernel/Kernel.php(185): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle()
#14 src/Symfony/Component/HttpKernel/Client.php(79): Symfony\Component\HttpKernel\Kernel->handle()
#15 src/Symfony/Bundle/FrameworkBundle/Client.php(131): Symfony\Component\HttpKernel\Client->doRequest()
#16 src/Symfony/Component/BrowserKit/Client.php(317): Symfony\Bundle\FrameworkBundle\Client->doRequest()
#17 src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php(23): Symfony\Component\BrowserKit\Client->request()
#18 [internal function]: Symfony\Bundle\SecurityBundle\Tests\Functional\CsrfFormLoginTest->testFormLoginAndLogoutWithCsrfTokens()
#19 {main}
KO src/Symfony/Bundle/SecurityBundle/

@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2015

I see, I'll look into it. (seems @jakzal just did it)

fabpot added a commit that referenced this issue Nov 28, 2015
…f deprecated intention (jakzal)

This PR was squashed before being merged into the 2.8 branch (closes #16722).

Discussion
----------

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16720
| License       | MIT
| Doc PR        | -

Commits
-------

0450865 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants