Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 59 additions & 42 deletions composer.lock

Large diffs are not rendered by default.

105 changes: 61 additions & 44 deletions composer/composer/installed.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions composer/pagerfanta/pagerfanta/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"doctrine\/mongodb-odm": "^2.4",
"doctrine\/orm": "^2.14 || ^3.0",
"doctrine\/phpcr-odm": "^1.7 || ^2.0",
"dg\/bypass-finals": "^1.5.1",
"dg\/bypass-finals": "^1.9",
"jackalope\/jackalope-doctrine-dbal": "^1.9 || ^2.0",
"phpstan\/extension-installer": "^1.4",
"phpstan\/phpstan": "2.0.3",
"phpstan\/phpstan-phpunit": "2.0.1",
"phpunit\/phpunit": "10.5.39",
"rector\/rector": "2.0.3",
"phpstan\/phpstan": "2.1.31",
"phpstan\/phpstan-phpunit": "2.0.7",
"phpunit\/phpunit": "10.5.58",
"rector\/rector": "2.2.3",
"ruflin\/elastica": "^7.3 || ^8.0",
"solarium\/solarium": "^6.2",
"symfony\/cache": "^5.4 || ^6.3 || ^7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"pagerfanta\/core": "^3.7 || ^4.0"
},
"require-dev": {
"dg\/bypass-finals": "^1.5.1",
"dg\/bypass-finals": "^1.9",
"phpunit\/phpunit": "^10.5"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"pagerfanta\/core": "^3.7 || ^4.0"
},
"require-dev": {
"dg\/bypass-finals": "^1.5.1",
"dg\/bypass-finals": "^1.9",
"jackalope\/jackalope-doctrine-dbal": "^1.9 || ^2.0",
"phpunit\/phpunit": "^10.5"
},
Expand Down
12 changes: 0 additions & 12 deletions composer/pagerfanta/pagerfanta/lib/Core/Pagerfanta.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public function getAdapter() : AdapterInterface
}
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function setAllowOutOfRangePages(bool $allowOutOfRangePages) : PagerfantaInterface
{
Expand All @@ -84,8 +82,6 @@ public function getAllowOutOfRangePages() : bool
}
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function setNormalizeOutOfRangePages(bool $normalizeOutOfRangePages) : PagerfantaInterface
{
Expand All @@ -99,8 +95,6 @@ public function getNormalizeOutOfRangePages() : bool
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1MaxPerPageException if the page is less than 1
*/
public function setMaxPerPage(int $maxPerPage) : PagerfantaInterface
Expand Down Expand Up @@ -139,8 +133,6 @@ public function getMaxPerPage() : int
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1CurrentPageException if the current page is less than 1
* @throws OutOfRangeCurrentPageException if It is not allowed out of range pages and they are not normalized
*/
Expand Down Expand Up @@ -286,8 +278,6 @@ private function minimumNbPages() : int
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1MaxPagesException if the max number of pages is less than 1
*/
public function setMaxNbPages(int $maxNbPages) : PagerfantaInterface
Expand All @@ -300,8 +290,6 @@ public function setMaxNbPages(int $maxNbPages) : PagerfantaInterface
}
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function resetMaxNbPages() : PagerfantaInterface
{
Expand Down
12 changes: 0 additions & 12 deletions composer/pagerfanta/pagerfanta/lib/Core/PagerfantaInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,17 @@ interface PagerfantaInterface extends \Countable, \IteratorAggregate
public function getAdapter() : AdapterInterface;
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function setAllowOutOfRangePages(bool $allowOutOfRangePages) : self;
public function getAllowOutOfRangePages() : bool;
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function setNormalizeOutOfRangePages(bool $normalizeOutOfRangePages) : self;
public function getNormalizeOutOfRangePages() : bool;
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1MaxPerPageException if the page is less than 1
*/
public function setMaxPerPage(int $maxPerPage) : self;
Expand All @@ -52,8 +46,6 @@ public function getMaxPerPage() : int;
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1CurrentPageException if the current page is less than 1
* @throws OutOfRangeCurrentPageException if It is not allowed out of range pages and they are not normalized
*/
Expand Down Expand Up @@ -85,15 +77,11 @@ public function getNbPages() : int;
/**
* @return $this
*
* @phpstan-self-out self<T>
*
* @throws LessThan1MaxPagesException if the max number of pages is less than 1
*/
public function setMaxNbPages(int $maxNbPages) : self;
/**
* @return $this
*
* @phpstan-self-out self<T>
*/
public function resetMaxNbPages() : self;
public function haveToPaginate() : bool;
Expand Down
12 changes: 12 additions & 0 deletions composer/twig/twig/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 3.22.0 (2025-10-29)

* Add support for two words test in guard tag
* Add `Environment::registerUndefinedTestCallback()`
* Fix compatibility with Symfony 8
* Fix accessing arrays with stringable objects as key
* Avoid errors when failing to guess the template info for an error
* Fix expression parser compatibility layer
* Fix compiling 'index' with repr (not string) in EmbedNode
* Update configuration keys + allow extra keys for CommonMark extensions
* Allow usage of other Markdown converters than CommonMark in LeagueMarkdown

# 3.21.1 (2025-05-03)

* Fix ExtensionSet usage of BinaryOperatorExpressionParser
Expand Down
18 changes: 9 additions & 9 deletions composer/twig/twig/src/Attribute/AsTwigFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
final class AsTwigFilter
{
/**
* @param non-empty-string $name The name of the filter in Twig.
* @param bool|null $needsCharset Whether the filter needs the charset passed as the first argument.
* @param bool|null $needsEnvironment Whether the filter needs the environment passed as the first argument, or after the charset.
* @param bool|null $needsContext Whether the filter needs the context array passed as the first argument, or after the charset and the environment.
* @param string[]|null $isSafe List of formats in which you want the raw output to be printed unescaped.
* @param string|array|null $isSafeCallback Function called at compilation time to determine if the filter is safe.
* @param string|null $preEscape Some filters may need to work on input that is already escaped or safe
* @param string[]|null $preservesSafety Preserves the safety of the value that the filter is applied to.
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
* @param non-empty-string $name The name of the filter in Twig
* @param bool|null $needsCharset Whether the filter needs the charset passed as the first argument
* @param bool|null $needsEnvironment Whether the filter needs the environment passed as the first argument, or after the charset
* @param bool|null $needsContext Whether the filter needs the context array passed as the first argument, or after the charset and the environment
* @param string[]|null $isSafe List of formats in which you want the raw output to be printed unescaped
* @param string|array|null $isSafeCallback Function called at compilation time to determine if the filter is safe
* @param string|null $preEscape Some filters may need to work on input that is already escaped or safe
* @param string[]|null $preservesSafety Preserves the safety of the value that the filter is applied to
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
*/
public function __construct(public string $name, public ?bool $needsCharset = null, public ?bool $needsEnvironment = null, public ?bool $needsContext = null, public ?array $isSafe = null, public string|array|null $isSafeCallback = null, public ?string $preEscape = null, public ?array $preservesSafety = null, public ?DeprecatedCallableInfo $deprecationInfo = null)
{
Expand Down
14 changes: 7 additions & 7 deletions composer/twig/twig/src/Attribute/AsTwigFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
final class AsTwigFunction
{
/**
* @param non-empty-string $name The name of the function in Twig.
* @param bool|null $needsCharset Whether the function needs the charset passed as the first argument.
* @param bool|null $needsEnvironment Whether the function needs the environment passed as the first argument, or after the charset.
* @param bool|null $needsContext Whether the function needs the context array passed as the first argument, or after the charset and the environment.
* @param string[]|null $isSafe List of formats in which you want the raw output to be printed unescaped.
* @param string|array|null $isSafeCallback Function called at compilation time to determine if the function is safe.
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
* @param non-empty-string $name The name of the function in Twig
* @param bool|null $needsCharset Whether the function needs the charset passed as the first argument
* @param bool|null $needsEnvironment Whether the function needs the environment passed as the first argument, or after the charset
* @param bool|null $needsContext Whether the function needs the context array passed as the first argument, or after the charset and the environment
* @param string[]|null $isSafe List of formats in which you want the raw output to be printed unescaped
* @param string|array|null $isSafeCallback Function called at compilation time to determine if the function is safe
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
*/
public function __construct(public string $name, public ?bool $needsCharset = null, public ?bool $needsEnvironment = null, public ?bool $needsContext = null, public ?array $isSafe = null, public string|array|null $isSafeCallback = null, public ?DeprecatedCallableInfo $deprecationInfo = null)
{
Expand Down
10 changes: 5 additions & 5 deletions composer/twig/twig/src/Attribute/AsTwigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
final class AsTwigTest
{
/**
* @param non-empty-string $name The name of the test in Twig.
* @param bool|null $needsCharset Whether the test needs the charset passed as the first argument.
* @param bool|null $needsEnvironment Whether the test needs the environment passed as the first argument, or after the charset.
* @param bool|null $needsContext Whether the test needs the context array passed as the first argument, or after the charset and the environment.
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
* @param non-empty-string $name The name of the test in Twig
* @param bool|null $needsCharset Whether the test needs the charset passed as the first argument
* @param bool|null $needsEnvironment Whether the test needs the environment passed as the first argument, or after the charset
* @param bool|null $needsContext Whether the test needs the context array passed as the first argument, or after the charset and the environment
* @param DeprecatedCallableInfo|null $deprecationInfo Information about the deprecation
*/
public function __construct(public string $name, public ?bool $needsCharset = null, public ?bool $needsEnvironment = null, public ?bool $needsContext = null, public ?DeprecatedCallableInfo $deprecationInfo = null)
{
Expand Down
15 changes: 11 additions & 4 deletions composer/twig/twig/src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
*/
class Environment
{
public const VERSION = '3.21.1';
public const VERSION_ID = 32101;
public const VERSION = '3.22.0';
public const VERSION_ID = 32200;
public const MAJOR_VERSION = 3;
public const MINOR_VERSION = 21;
public const RELEASE_VERSION = 1;
public const MINOR_VERSION = 22;
public const RELEASE_VERSION = 0;
public const EXTRA_VERSION = '';
private $charset;
private $loader;
Expand Down Expand Up @@ -730,6 +730,13 @@ public function getTest(string $name) : ?TwigTest
{
return $this->extensionSet->getTest($name);
}
/**
* @param callable(string): (TwigTest|false) $callable
*/
public function registerUndefinedTestCallback(callable $callable) : void
{
$this->extensionSet->registerUndefinedTestCallback($callable);
}
/**
* @return void
*/
Expand Down
6 changes: 5 additions & 1 deletion composer/twig/twig/src/Error/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ private function guessTemplateInfo() : void
break;
}
}
if (null === $template) {
return;
// Impossible to guess the info as the template was not found in the backtrace
}
$r = new \ReflectionObject($template);
$file = $r->getFileName();
$exceptions = [$e = $this];
Expand All @@ -139,7 +143,7 @@ private function guessTemplateInfo() : void
}
while ($e = \array_pop($exceptions)) {
$traces = $e->getTrace();
\array_unshift($traces, ['file' => $e instanceof Error ? $e->phpFile : $e->getFile(), 'line' => $e instanceof Error ? $e->phpLine : $e->getLine()]);
\array_unshift($traces, ['file' => $e instanceof self ? $e->phpFile : $e->getFile(), 'line' => $e instanceof self ? $e->phpLine : $e->getLine()]);
while ($trace = \array_shift($traces)) {
if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions composer/twig/twig/src/ExpressionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function parseFilterExpressionRaw($node)
public function parseArguments()
{
trigger_deprecation('twig/twig', '3.19', \sprintf('The "%s()" method is deprecated, use "Twig\\ExpressionParser\\Infix\\ArgumentsTrait::parseNamedArguments()" instead.', __METHOD__));
$parsePrimary = new \ReflectionMethod($this->parser, 'parsePrimary');
$parsePrimaryExpression = new \ReflectionMethod($this->parser, 'parsePrimaryExpression');
$namedArguments = \false;
$definition = \false;
if (\func_num_args() > 1) {
Expand Down Expand Up @@ -221,7 +221,7 @@ public function parseArguments()
}
$name = $value->getAttribute('name');
if ($definition) {
$value = $parsePrimary->invoke($this->parser);
$value = $parsePrimaryExpression->invoke($this->parser);
if (!$this->checkConstantExpression($value)) {
throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, a sequence, or a mapping).', $token->getLine(), $stream->getSourceContext());
}
Expand Down
10 changes: 7 additions & 3 deletions composer/twig/twig/src/Extension/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ public static function getAttribute(Environment $env, Source $source, $object, $
}
}
if (match (\true) {
\is_array($object) => \array_key_exists($arrayItem, $object),
\is_array($object) => \array_key_exists($arrayItem = (string) $arrayItem, $object),
$object instanceof \ArrayAccess => $object->offsetExists($arrayItem),
default => \false,
}) {
Expand All @@ -1445,9 +1445,13 @@ public static function getAttribute(Environment $env, Source $source, $object, $
return;
}
if ($object instanceof \ArrayAccess) {
$message = \sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, $object::class);
if (\is_object($arrayItem) || \is_array($arrayItem)) {
$message = \sprintf('Key of type "%s" does not exist in ArrayAccess-able object of class "%s".', \get_debug_type($arrayItem), \get_debug_type($object));
} else {
$message = \sprintf('Key "%s" does not exist in ArrayAccess-able object of class "%s".', $arrayItem, \get_debug_type($object));
}
} elseif (\is_object($object)) {
$message = \sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, $object::class);
$message = \sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_debug_type($object));
} elseif (\is_array($object)) {
if (!$object) {
$message = \sprintf('Key "%s" does not exist as the sequence/mapping is empty.', $arrayItem);
Expand Down
3 changes: 3 additions & 0 deletions composer/twig/twig/src/Extension/ExtensionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
*/
namespace OCA\Libresign\Vendor\Twig\Extension;

use OCA\Libresign\Vendor\Twig\ExpressionParser;
use OCA\Libresign\Vendor\Twig\ExpressionParser\ExpressionParserInterface;
use OCA\Libresign\Vendor\Twig\ExpressionParser\PrecedenceChange;
use OCA\Libresign\Vendor\Twig\Node\Expression\Binary\AbstractBinary;
use OCA\Libresign\Vendor\Twig\Node\Expression\Unary\AbstractUnary;
use OCA\Libresign\Vendor\Twig\NodeVisitor\NodeVisitorInterface;
use OCA\Libresign\Vendor\Twig\TokenParser\TokenParserInterface;
use OCA\Libresign\Vendor\Twig\TwigFilter;
Expand Down
14 changes: 14 additions & 0 deletions composer/twig/twig/src/ExtensionSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ final class ExtensionSet
private $functionCallbacks = [];
/** @var array<callable(string): (TwigFilter|false)> */
private $filterCallbacks = [];
/** @var array<callable(string): (TwigTest|false)> */
private $testCallbacks = [];
/** @var array<callable(string): (TokenParserInterface|false)> */
private $parserCallbacks = [];
private $lastModified = 0;
Expand Down Expand Up @@ -341,8 +343,20 @@ public function getTest(string $name) : ?TwigTest
return $test->withDynamicArguments($name, $test->getName(), $matches);
}
}
foreach ($this->testCallbacks as $callback) {
if (\false !== ($test = $callback($name))) {
return $test;
}
}
return null;
}
/**
* @param callable(string): (TwigTest|false) $callable
*/
public function registerUndefinedTestCallback(callable $callable) : void
{
$this->testCallbacks[] = $callable;
}
public function getExpressionParsers() : ExpressionParsers
{
if (!$this->initialized) {
Expand Down
2 changes: 1 addition & 1 deletion composer/twig/twig/src/Node/EmbedNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(string $name, int $index, ?AbstractExpression $varia
}
protected function addGetTemplate(Compiler $compiler, string $template = '') : void
{
$compiler->raw('$this->load(')->string($this->getAttribute('name'))->raw(', ')->repr($this->getTemplateLine())->raw(', ')->string($this->getAttribute('index'))->raw(')');
$compiler->raw('$this->load(')->string($this->getAttribute('name'))->raw(', ')->repr($this->getTemplateLine())->raw(', ')->repr($this->getAttribute('index'))->raw(')');
if ($this->getAttribute('ignore_missing')) {
$compiler->raw(";\n")->write(\sprintf("\$%s->getParent(\$context);\n", $template));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

use OCA\Libresign\Vendor\Twig\Compiler;
use OCA\Libresign\Vendor\Twig\Error\SyntaxError;
use OCA\Libresign\Vendor\Twig\Node\Expression\ReturnBoolInterface;
use OCA\Libresign\Vendor\Twig\Node\Expression\ConstantExpression;
use OCA\Libresign\Vendor\Twig\Node\Expression\ReturnBoolInterface;
use OCA\Libresign\Vendor\Twig\Node\Node;
/** @internal */
class MatchesBinary extends AbstractBinary implements ReturnBoolInterface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace OCA\Libresign\Vendor\Twig\Node\Expression\FunctionNode;

use OCA\Libresign\Vendor\Twig\Compiler;
Expand Down
Loading