Skip to content

Commit

Permalink
Merge branch '3.x' into 4.x
Browse files Browse the repository at this point in the history
* 3.x:
  Fix BC break on escaper extension
  Fix constant return type
  • Loading branch information
fabpot committed May 11, 2024
2 parents b80f74a + 1de5736 commit 58b17d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Extension/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1357,9 +1357,12 @@ public static function source(Environment $env, $name, $ignoreMissing = false):
* @param string $constant The name of the constant
* @param object|null $object The object to get the constant from
*
* @return mixed Class constants can return many types like scalars, arrays, and
* objects depending on the PHP version (\BackedEnum, \UnitEnum, etc.)
*
* @internal
*/
public static function constant($constant, $object = null): string
public static function constant($constant, $object = null)
{
if (null !== $object) {
if ('class' === $constant) {
Expand Down

0 comments on commit 58b17d7

Please sign in to comment.