-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
fixed some deprecated notices #13434
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
Conversation
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | no |
Fixed tickets | - |
License | MIT |
Doc PR | - |
👍 |
@@ -63,6 +64,10 @@ public function process(ContainerBuilder $container) | |||
$container->getDefinition('twig.extension.code')->replaceArgument(0, $container->getParameter('templating.helper.code.file_link_format')); | |||
} | |||
|
|||
if (!$container->has('security.token_storage')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? Shouldn't this be if ($container->has('security.token_storage'))
(without the !
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure :) If the token storage does not exist, it means you are using an older version, where we need to inject the security service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now I get what you are trying to achieve. But then, the service definition requested via getDefinition()
below should be twig.app_variable
and not security.token_storage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
97c50b4
to
84f3753
Compare
This PR was merged into the 2.7 branch. Discussion ---------- fixed some deprecated notices | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 84f3753 fixed some deprecated notices
This PR was merged into the 2.7 branch. Discussion ---------- Fix usage of app.security | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Reverts the previous attempt to remove notices when using the `app.security` variable in Twig because it did not work (it prevents using `app.security` altogether). So, instead, we inject the container and only get the security service (and thus triggering the deprecation notice) when the user is using `app.security`. Commits ------- 09ed9b5 removed deprecated notices when using the security service 1067cc5 Revert "minor #13434 fixed some deprecated notices (fabpot)"
* 2.7: removed deprecation notice for internal constant removed deprecated notices when using the security service [Validator] fixed deprecation notice for ElementMetadata Revert "minor #13434 fixed some deprecated notices (fabpot)" removed usage of the deprecated EsiListener class in core [security] Fetching current stored context when not explicitly specified [FrameworkBundle] Container parameters in Route#condition Deprecated setDefaultOptions() in favor of configureOptions() Conflicts: src/Symfony/Bridge/Doctrine/composer.json src/Symfony/Bridge/Propel1/composer.json src/Symfony/Bridge/Twig/AppVariable.php src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php