Skip to content

Commit

Permalink
fix the version mergeGlobals() is deprecated since
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Sep 9, 2024
1 parent 995e7c2 commit f72c93d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Testing Utilities
Environment
-----------

* The ``Twig\Environment::mergeGlobals()`` method is deprecated as of Twig 3.13
* The ``Twig\Environment::mergeGlobals()`` method is deprecated as of Twig 3.14
and will be removed in Twig 4.0:

Before::
Expand Down
4 changes: 2 additions & 2 deletions src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,11 @@ public function resetGlobals(): void
}

/**
* @deprecated since Twig 3.13
* @deprecated since Twig 3.14
*/
public function mergeGlobals(array $context): array
{
trigger_deprecation('twig/twig', '3.13', 'The "%s" method is deprecated.', __METHOD__);
trigger_deprecation('twig/twig', '3.14', 'The "%s" method is deprecated.', __METHOD__);

return $context + $this->getGlobals();
}
Expand Down

0 comments on commit f72c93d

Please sign in to comment.