diff --git a/Changelog.md b/Changelog.md index 1f058e2cb..940a2cb40 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ Changelog ========= +### 2.4.0 (2020-01-08) + +* Deprecated the `CommentExtension::isCommentDeleted` method. + ### 2.3.3 (2019-11-06) * Fix: use `Symfony\Contracts\EventDispatcher\Event` if available. diff --git a/Twig/CommentExtension.php b/Twig/CommentExtension.php index 3a41acbfd..502fcd532 100644 --- a/Twig/CommentExtension.php +++ b/Twig/CommentExtension.php @@ -64,6 +64,8 @@ public function getTests() */ public function isCommentDeleted(CommentInterface $comment) { + @trigger_error('The "isCommentDeleted" method is deprecated since version 2.4 and will be removed in 3.0. Use "isCommentInState" instead.', E_USER_DEPRECATED); + return $this->isCommentInState($comment, $comment::STATE_DELETED); }