-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.7] adds deprecation notices. #13060
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
Changes from 1 commit
86b9f6b
6f57b7b
2a9749d
39cfd47
fd9c7bb
97efd2c
a7f841e
cd9617a
e608ba6
738b9be
2a3e7d2
fd47c07
f9fbb4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,16 +42,17 @@ public function __construct(\Twig_Environment $environment, TemplateNameParserIn | |
} | ||
|
||
/** | ||
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Inject the escaping | ||
* strategy on Twig_Environment instead | ||
* @deprecated since version 2.3, to be removed in 3.0. | ||
* Inject the escaping strategy on \Twig_Environment instead. | ||
*/ | ||
public function setDefaultEscapingStrategy($strategy) | ||
{ | ||
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy); | ||
} | ||
|
||
/** | ||
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead. | ||
* @deprecated since version 2.3, to be removed in 3.0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, this message should mention the patch version of 2.3, because TwigDefaultEscapingStrategy does not exist in 2.3.0. It was added in a recent patch version to fix a bug. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please explain more, I don't understand what you're meaning. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The message is completely wrong, isn't it? As this deprecation was done 6 days ago, meaning in 2.7-dev: #13141 The message states version 2.3 already deprecated it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The deprecation is in 2.3 branch... Which deprecation message shall we set instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, my bad. It was merged in 2.3 indeed. However, and this is what @stof also meant, it's not deprecated in 2.3.0. It's going to be deprecated in 2.3.24 (the next symfony 2.3.x release). So the message should actually say:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if it was deprecated in a patch version it was a mistake imo. we should not do that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should mark it as deprecated from 2.7 only (given it is the first minor version which will have the new method from the start, even though the method is not used by Symfony even in older versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's mark it as deprecated since 2.7 then. |
||
* Use TwigDefaultEscapingStrategy instead. | ||
*/ | ||
public function guessDefaultEscapingStrategy($filename) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add a warning here (TwigBundle does not use the deprecated method anymore. |
||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
namespace Symfony\Component\Validator\Context; | ||
|
||
trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory is deprecated since version 2.5 and will be removed in 3.0.'); | ||
trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be removed, because Symfony uses this class all the time to be able to use the BC layer. |
||
|
||
use Symfony\Component\Translation\TranslatorInterface; | ||
use Symfony\Component\Validator\MetadataFactoryInterface; | ||
|
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.
please add a deprecation warning in it (TwigBundle does not call this method anymore. It sets the strategy directly in Twig)