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
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
}
},
"require": {
"bamarni/composer-bin-plugin": "^1.8",
"bamarni/composer-bin-plugin": "^1.8.2",
"roave/security-advisories": "dev-latest",
"endroid/qr-code": "^5.1",
"jsignpdf/jsignpdf-php": "^1.3",
"endroid/qr-code": "^5.1.0",
"jsignpdf/jsignpdf-php": "^1.3.1",
"libresign/whatosami": "^0.0.2",
"mikehaertl/php-pdftk": "^0.14.0",
"mpdf/mpdf": "^8.2",
"pagerfanta/pagerfanta": "^4.5",
"phpseclib/phpseclib": "^3.0",
"smalot/pdfparser": "^2.4",
"twig/twig": "^3.20",
"wobeto/email-blur": "^1.0"
"mikehaertl/php-pdftk": "^0.14.2",
"mpdf/mpdf": "^8.2.6",
"pagerfanta/pagerfanta": "^4.7.1",
"phpseclib/phpseclib": "^3.0.47",
"smalot/pdfparser": "^2.12.1",
"twig/twig": "^3.21.1",
"wobeto/email-blur": "^1.0.0"
}
}
4 changes: 2 additions & 2 deletions composer/mpdf/mpdf/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
},
"autoload": {
"psr-4": {
"OCA\\Libresign\\Vendor\\OCA\Libresign\Vendor\\Mpdf\\": "src\/"
"OCA\\Libresign\\Vendor\\Mpdf\\": "src\/"
},
"files": [
"src\/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"OCA\\Libresign\\Vendor\\OCA\Libresign\Vendor\\Mpdf\\": "tests\/Mpdf"
"OCA\\Libresign\\Vendor\\Mpdf\\": "tests\/Mpdf"
},
"files": [
"src\/functions-dev.php"
Expand Down
88 changes: 44 additions & 44 deletions composer/twig/twig/src/Resources/core.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer/twig/twig/src/Resources/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @deprecated since Twig 3.9
*/
function \OCA\Libresign\Vendor\twig_var_dump(Environment $env, $context, ...$vars)
function twig_var_dump(Environment $env, $context, ...$vars)
{
trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
DebugExtension::dump($env, $context, ...$vars);
Expand Down
6 changes: 3 additions & 3 deletions composer/twig/twig/src/Resources/escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @deprecated since Twig 3.9
*/
function \OCA\Libresign\Vendor\twig_raw_filter($string)
function twig_raw_filter($string)
{
trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
return $string;
Expand All @@ -29,7 +29,7 @@ function \OCA\Libresign\Vendor\twig_raw_filter($string)
*
* @deprecated since Twig 3.9
*/
function \OCA\Libresign\Vendor\twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = \false)
function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = \false)
{
trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
return $env->getRuntime(EscaperRuntime::class)->escape($string, $strategy, $charset, $autoescape);
Expand All @@ -39,7 +39,7 @@ function \OCA\Libresign\Vendor\twig_escape_filter(Environment $env, $string, $st
*
* @deprecated since Twig 3.9
*/
function \OCA\Libresign\Vendor\twig_escape_filter_is_safe(Node $filterArgs)
function twig_escape_filter_is_safe(Node $filterArgs)
{
trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
return EscaperExtension::escapeFilterIsSafe($filterArgs);
Expand Down
2 changes: 1 addition & 1 deletion composer/twig/twig/src/Resources/string_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @deprecated since Twig 3.9
*/
function \OCA\Libresign\Vendor\twig_template_from_string(Environment $env, $template, ?string $name = null) : TemplateWrapper
function twig_template_from_string(Environment $env, $template, ?string $name = null) : TemplateWrapper
{
trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
return StringLoaderExtension::templateFromString($env, $template, $name);
Expand Down
12 changes: 10 additions & 2 deletions scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@
'patchers' => [
// patchers for twig
static function (string $filePath, string $prefix, string $content): string {
if (!str_contains($filePath, 'twig/twig') || !str_ends_with($filePath, '.php')) {
return $content;
}
// correct use statements in generated templates
if (preg_match('%twig/src/Node/ModuleNode\\.php$%', $filePath)) {
if (str_ends_with($filePath, 'twig/src/Node/ModuleNode.php')) {
return str_replace('"use Twig\\', '"use ' . str_replace('\\', '\\\\', $prefix) . '\\\\Twig\\', $content);
}

// ignore files where functions are declared
if (str_contains($filePath, 'twig/src/Resources/')) {
return $content;
}

// correctly scope function calls to twig_... globals (which will not be globals anymore) in strings
if (strpos($filePath, 'twig/twig') !== false
|| preg_match('/\\.php$/', $filePath)
Expand All @@ -49,7 +57,7 @@ static function (string $filePath, string $prefix, string $content): string {
},
// patchers for Mpdf
static function (string $filePath, string $prefix, string $content): string {
if (!str_contains($filePath, 'mpdf/mpdf')) {
if (!str_contains($filePath, 'mpdf/mpdf') || !str_ends_with($filePath, '.php')) {
return $content;
}
$searchReplacePairs = [
Expand Down
Loading