Skip to content

Commit

Permalink
minor #4290 fix the version mergeGlobals() is deprecated since (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.x branch.

Discussion
----------

fix the version mergeGlobals() is deprecated since

Commits
-------

f72c93d fix the version mergeGlobals() is deprecated since
  • Loading branch information
fabpot committed Sep 9, 2024
2 parents 7957202 + f72c93d commit 540b54e
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 540b54e

Please sign in to comment.