-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[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 |
---|---|---|
|
@@ -23,41 +23,41 @@ | |
class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface | ||
{ | ||
/** | ||
* @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. | ||
* @deprecated since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. | ||
*/ | ||
public function emerg($message, array $context = array()) | ||
{ | ||
trigger_error('The emerg() method of the Monolog Logger was removed. You should use the new method emergency() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the emergency() method instead, which is PSR-3 compatible.', 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. This message should be adjusted saying that the method is deprecated (it comes from the deprecated Symfony LoggerInterface actually) |
||
|
||
return parent::addRecord(BaseLogger::EMERGENCY, $message, $context); | ||
} | ||
|
||
/** | ||
* @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. | ||
* @deprecated since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. | ||
*/ | ||
public function crit($message, array $context = array()) | ||
{ | ||
trigger_error('The crit() method of the Monolog Logger was removed. You should use the new method critical() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
|
||
return parent::addRecord(BaseLogger::CRITICAL, $message, $context); | ||
} | ||
|
||
/** | ||
* @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. | ||
* @deprecated since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. | ||
*/ | ||
public function err($message, array $context = array()) | ||
{ | ||
trigger_error('The err() method of the Monolog Logger was removed. You should use the new method error() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
|
||
return parent::addRecord(BaseLogger::ERROR, $message, $context); | ||
} | ||
|
||
/** | ||
* @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. | ||
* @deprecated since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. | ||
*/ | ||
public function warn($message, array $context = array()) | ||
{ | ||
trigger_error('The warn() method of the Monolog Logger was removed. You should use the new method warning() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); | ||
|
||
return parent::addRecord(BaseLogger::WARNING, $message, $context); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ protected function configure() | |
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
trigger_error('The router:dump-apache command is deprecated since 2.5 and will be removed in 3.0', E_USER_DEPRECATED); | ||
trigger_error('The router:dump-apache command 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. here, it will probably be better to display a warning in the output instead given that it is a command |
||
|
||
$router = $this->getContainer()->get('router'); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
|
||
namespace Symfony\Bundle\TwigBundle\Extension; | ||
|
||
trigger_error('The '.__NAMESPACE__.'\ActionsExtension class is deprecated since version 2.2 and will be removed in Symfony 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. this is wrong, because it would trigger it all the time (TwigBundle is registering the extension in Twig) 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 solution might be to go the same way than for DialogHelper and TableHelper: trigger it in the constructor and add an optional constructor argument to disable it. This way, the bundle could disable the warning, but people register the extension manually would get the warning 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. @hhamon you haven't handled this comment |
||
|
||
use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use Symfony\Component\HttpKernel\Fragment\FragmentHandler; | ||
|
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.
should be
__CLASS__.'::'.__METHOD__
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.
Not sure: http://3v4l.org/tdsku
__METHOD__ === __CLASS__.'::'.__FUNCTION__
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.
The
__METHOD__
constant already prefixes withTheClass::
.When I run this script, it outputs
A\B::c is deprecated.
.