Fix constant return type

This commit is contained in:
Fabien Potencier
2024-05-11 18:56:54 +02:00
parent bfc3b7b19b
commit f6ce88df2f
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# 3.10.1 (2024-XX-XX)
* n/a
* Fix constant return type
# 3.10.0 (2024-05-11)
+4 -1
View File
@@ -1365,9 +1365,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) {