Merge branch '3.x' into 4.x

* 3.x:
  Fix BC break on escaper extension
  Fix constant return type
This commit is contained in:
Fabien Potencier
2024-05-11 23:08:49 +02:00
+4 -1
View File
@@ -1357,9 +1357,12 @@ final class CoreExtension extends AbstractExtension
* @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) {