mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 04:27:00 +00:00
Fix constant() behavior when used with ??
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# 3.19.0 (2025-XX-XX)
|
||||
|
||||
* Fix `constant()` behavior when used with `??`
|
||||
* Add the `invoke` filter
|
||||
* Make `{}` optional for the `types` tag
|
||||
* Add `LastModifiedExtensionInterface` and implementation in `AbstractExtension` to track modification of runtime classes
|
||||
|
||||
@@ -105,6 +105,13 @@ class Node implements \Countable, \IteratorAggregate
|
||||
return $repr;
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
foreach ($this->nodes as $name => $node) {
|
||||
$this->nodes[$name] = clone $node;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
{{ constant('DATE_W3C') == expect ? 'true' : 'false' }}
|
||||
{{ constant('ARRAY_AS_PROPS', object) }}
|
||||
{{ constant('class', object) }}
|
||||
{{ constant('ARRAY_AS_PROPS', object) ?? 'KO' }}
|
||||
--DATA--
|
||||
return ['expect' => DATE_W3C, 'object' => new \ArrayObject(['hi'])]
|
||||
--EXPECT--
|
||||
true
|
||||
2
|
||||
ArrayObject
|
||||
2
|
||||
|
||||
Reference in New Issue
Block a user