mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
N°5122 - Minor libs update according to new PHP min version
This commit is contained in:
3
lib/twig/twig/.github/workflows/ci.yml
vendored
3
lib/twig/twig/.github/workflows/ci.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
env:
|
||||
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: "PHP ${{ matrix.php-version }}"
|
||||
|
||||
@@ -6,6 +6,9 @@ on:
|
||||
branches:
|
||||
- '3.x'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build"
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
# 3.4.2 (2022-08-12)
|
||||
|
||||
* Allow inherited magic method to still run with calling class
|
||||
* Fix CallExpression::reflectCallable() throwing TypeError
|
||||
* Fix typo in naming (currency_code)
|
||||
|
||||
# 3.4.1 (2022-05-17)
|
||||
|
||||
* Fix optimizing non-public named closures
|
||||
|
||||
@@ -38,11 +38,11 @@ use Twig\TokenParser\TokenParserInterface;
|
||||
*/
|
||||
class Environment
|
||||
{
|
||||
public const VERSION = '3.4.1';
|
||||
public const VERSION_ID = 30401;
|
||||
public const VERSION = '3.4.2';
|
||||
public const VERSION_ID = 30402;
|
||||
public const MAJOR_VERSION = 3;
|
||||
public const MINOR_VERSION = 4;
|
||||
public const RELEASE_VERSION = 1;
|
||||
public const RELEASE_VERSION = 2;
|
||||
public const EXTRA_VERSION = '';
|
||||
|
||||
private $charset;
|
||||
|
||||
@@ -290,7 +290,12 @@ abstract class CallExpression extends AbstractExpression
|
||||
}
|
||||
|
||||
$checkVisibility = $callable instanceof \Closure;
|
||||
$r = new \ReflectionFunction(\Closure::fromCallable($callable));
|
||||
try {
|
||||
$closure = \Closure::fromCallable($callable);
|
||||
} catch (\TypeError $e) {
|
||||
throw new \LogicException(sprintf('Callback for %s "%s" is not callable in the current scope.', $this->getAttribute('type'), $this->getAttribute('name')), 0, $e);
|
||||
}
|
||||
$r = new \ReflectionFunction($closure);
|
||||
|
||||
if (false !== strpos($r->name, '{closure}')) {
|
||||
return $this->reflector = [$r, $callable, 'Closure'];
|
||||
@@ -300,8 +305,7 @@ abstract class CallExpression extends AbstractExpression
|
||||
$callable = [$object, $r->name];
|
||||
$callableName = (\function_exists('get_debug_type') ? get_debug_type($object) : \get_class($object)).'::'.$r->name;
|
||||
} elseif ($class = $r->getClosureScopeClass()) {
|
||||
$callable = [$class, $r->name];
|
||||
$callableName = $class.'::'.$r->name;
|
||||
$callableName = (\is_array($callable) ? $callable[0] : $class->name).'::'.$r->name;
|
||||
} else {
|
||||
$callable = $callableName = $r->name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user