diff --git a/CHANGELOG b/CHANGELOG index cf6ae38ae8..2620c6af7b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,10 @@ # 3.17.0 (2024-XX-XX) * Support underscores in number literals + * Deprecate `ConditionalExpression` and `NullCoalesceExpression` (use `ConditionalTernary` and `NullCoalesceBinary` instead) # 3.16.0 (2024-11-29) - * Deprecate `ConditionalExpression` and `NullCoalesceExpression` (use `ConditionalTernary` and `NullCoalesceBinary` instead) * Deprecate `InlinePrint` * Fix having macro variables starting with an underscore * Deprecate not passing a `Source` instance to `TokenStream` diff --git a/doc/deprecated.rst b/doc/deprecated.rst index 4d4d096adb..a6679a9eb3 100644 --- a/doc/deprecated.rst +++ b/doc/deprecated.rst @@ -193,11 +193,11 @@ Nodes replacement. * The ``Twig\Node\Expression\NullCoalesceExpression`` class is deprecated as - of Twig 3.16, use ``Twig\Node\Expression\Binary\NullCoalesceBinary`` + of Twig 3.17, use ``Twig\Node\Expression\Binary\NullCoalesceBinary`` instead. * The ``Twig\Node\Expression\ConditionalExpression`` class is deprecated as of - Twig 3.16, use ``Twig\Node\Expression\Ternary\ConditionalTernary`` instead. + Twig 3.17, use ``Twig\Node\Expression\Ternary\ConditionalTernary`` instead. Node Visitors ------------- diff --git a/src/Node/Expression/ConditionalExpression.php b/src/Node/Expression/ConditionalExpression.php index 1ca90f8113..7fe309cf30 100644 --- a/src/Node/Expression/ConditionalExpression.php +++ b/src/Node/Expression/ConditionalExpression.php @@ -19,7 +19,7 @@ class ConditionalExpression extends AbstractExpression implements OperatorEscape { public function __construct(AbstractExpression $expr1, AbstractExpression $expr2, AbstractExpression $expr3, int $lineno) { - trigger_deprecation('twig/twig', '3.16', \sprintf('"%s" is deprecated; use "%s" instead.', __CLASS__, ConditionalTernary::class)); + trigger_deprecation('twig/twig', '3.17', \sprintf('"%s" is deprecated; use "%s" instead.', __CLASS__, ConditionalTernary::class)); parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); } diff --git a/src/Node/Expression/NullCoalesceExpression.php b/src/Node/Expression/NullCoalesceExpression.php index be2136ca57..c07bb36963 100644 --- a/src/Node/Expression/NullCoalesceExpression.php +++ b/src/Node/Expression/NullCoalesceExpression.php @@ -29,7 +29,7 @@ class NullCoalesceExpression extends ConditionalExpression */ public function __construct(Node $left, Node $right, int $lineno) { - trigger_deprecation('twig/twig', '3.16', \sprintf('"%s" is deprecated; use "%s" instead.', __CLASS__, NullCoalesceBinary::class)); + trigger_deprecation('twig/twig', '3.17', \sprintf('"%s" is deprecated; use "%s" instead.', __CLASS__, NullCoalesceBinary::class)); if (!$left instanceof AbstractExpression) { trigger_deprecation('twig/twig', '3.15', 'Not passing a "%s" instance to the "left" argument of "%s" is deprecated ("%s" given).', AbstractExpression::class, static::class, \get_class($left));