Package: src:twig-i18n-extension
Version: 5.0.1-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202605/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:twig-i18n-extension, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
phpabtpl composer.json > debian/autoload.php.tpl
# generate autoload-files. keep in sync with debian/tests/phpunit
phpab --output src/autoload.php \
        --template debian/autoload.php.tpl \
        src
phpab %development% - Copyright (C) 2009 - 2025 by Arne Blankerts and 
Contributors

[... snipped ...]


/usr/share/php/Twig/Test/NodeTestCase.php:70
/usr/share/php/Twig/Test/NodeTestCase.php:56

6) PhpMyAdmin\Tests\Twig\Extensions\Node\TransTest::testCompile#4 with data 
(PhpMyAdmin\Twig\Extensions\Node\TransNode Object (...), 'yield 
strtr(gettext("J'ai %fo...), ));')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'yield strtr(gettext("J'ai %foo% pommes"), array(...'
+'yield strtr(gettext("J\x27ai %foo% pommes"), array(...'

/usr/share/php/Twig/Test/NodeTestCase.php:70
/usr/share/php/Twig/Test/NodeTestCase.php:56

7) PhpMyAdmin\Tests\Twig\Extensions\Node\TransTest::testCompile#6 with data 
(PhpMyAdmin\Twig\Extensions\Node\TransNode Object (...), 'yield 
strtr(gettext("J'ai %fo...), ));')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'yield strtr(gettext("J'ai %foo% pommes"), array(...'
+'yield strtr(gettext("J\x27ai %foo% pommes"), array(...'

/usr/share/php/Twig/Test/NodeTestCase.php:70
/usr/share/php/Twig/Test/NodeTestCase.php:56

--

There were 2 risky tests:

1) 
PhpMyAdmin\Tests\Twig\Extensions\Node\I18nExtensionMoTranslatorSandboxTest::[email protected]
 with data ('Plural.test', 'Test a plural example with "e..." code', '', ['\n{# 
Plural tag without domai...ans %}'], false, [['--DATA--\nif (! 
class_exists(...pples.', '\nif (! class_exists('CustomO...> 2]\n', '\nreturn 
[]\n', '\nHey Jim, I have 2 apples.']], ...3 more elements)
Test code or tested code printed unexpected output: Compiled templates that 
failed on case 1:
Template: index.twig
<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* index.twig */
class __TwigTemplate_81c90f9b48f988977b19928e849e1887 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
        $this->sandbox = $this->extensions[SandboxExtension::class];
        $this->checkSecurity();
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 1
        yield "
";
        // line 3
        $context["name"] = "Jim";
        // line 4
        $context["apple_count"] = 2;
        // line 5
yield strtr(_dnpgettext((isset($context["obj"]) || array_key_exists("obj", 
$context) ? $context["obj"] : (function () { throw new RuntimeError('Variable 
"obj" does not exist.', 5, $this->source); })()), "%escape% %escape%", "Hey 
%escape%, I have one apple.", "Hey %escape%, I have %escape% apples.", 
abs(CoreExtension::getAttribute($this->env, $this->source, [        // line 7
(isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : 
(function () { throw new RuntimeError('Variable "a" does not exist.', 7, 
$this->source); })())], 0, [], "array", false, false, true, 7))), 
array("%escape%" =>         // line 6
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 6, $this->source); })()), "%escape%" =>         // line 8
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 8, $this->source); })()), "%escape%" => 
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 8, $this->source); })()), ));
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "index.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  54 => 8,  53 => 6,  52 => 7,  51 => 5,  49 => 4,  47 => 
3,  44 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "index.twig", "");
    }
    
    public function checkSecurity()
    {
        static $tags = ["set" => 3, "trans" => 5];
        static $filters = ["escape" => 6, "upper" => 10];
        static $functions = [];

        try {
            $this->sandbox->checkSecurity(
                ['set', 'trans'],
                ['escape', 'upper'],
                [],
                $this->source
            );
        } catch (SecurityError $e) {
            $e->setSourceContext($this->source);

            if ($e instanceof SecurityNotAllowedTagError && 
isset($tags[$e->getTagName()])) {
                $e->setTemplateLine($tags[$e->getTagName()]);
            } elseif ($e instanceof SecurityNotAllowedFilterError && 
isset($filters[$e->getFilterName()])) {
                $e->setTemplateLine($filters[$e->getFilterName()]);
            } elseif ($e instanceof SecurityNotAllowedFunctionError && 
isset($functions[$e->getFunctionName()])) {
                $e->setTemplateLine($functions[$e->getFunctionName()]);
            }

            throw $e;
        }

    }
}

/usr/share/php/Twig/Test/IntegrationTestCase.php:129

2) 
PhpMyAdmin\Tests\Twig\Extensions\Node\I18nExtensionSandboxTest::[email protected]
 with data ('Plural.test', 'Test a plural example with "e..." code', '', ['\n{# 
Plural tag without domai...ans %}'], false, [['--DATA--\nif (! 
class_exists(...pples.', '\nif (! class_exists('CustomO...> 2]\n', '\nreturn 
[]\n', '\nHey Jim, I have 2 apples.']], ...3 more elements)
Test code or tested code printed unexpected output: Compiled templates that 
failed on case 1:
Template: index.twig
<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* index.twig */
class __TwigTemplate_81c90f9b48f988977b19928e849e1887 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
        $this->sandbox = $this->extensions[SandboxExtension::class];
        $this->checkSecurity();
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 1
        yield "
";
        // line 3
        $context["name"] = "Jim";
        // line 4
        $context["apple_count"] = 2;
yield strtr(_dnpgettext(        // line 5
(isset($context["obj"]) || array_key_exists("obj", $context) ? $context["obj"] 
: (function () { throw new RuntimeError('Variable "obj" does not exist.', 5, 
$this->source); })()), "%escape% %escape%", "Hey %escape%, I have one apple.", 
"Hey %escape%, I have %escape% apples.", 
abs(CoreExtension::getAttribute($this->env, $this->source, [        // line 7
(isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : 
(function () { throw new RuntimeError('Variable "a" does not exist.', 7, 
$this->source); })())], 0, [], "array", false, false, true, 7))), 
array("%escape%" =>         // line 6
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 6, $this->source); })()), "%escape%" =>         // line 8
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 8, $this->source); })()), "%escape%" => 
(isset($context["escape"]) || array_key_exists("escape", $context) ? 
$context["escape"] : (function () { throw new RuntimeError('Variable "escape" 
does not exist.', 8, $this->source); })()), ));
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "index.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  54 => 8,  53 => 6,  52 => 7,  51 => 5,  49 => 4,  47 => 
3,  44 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "index.twig", "");
    }
    
    public function checkSecurity()
    {
        static $tags = ["set" => 3, "trans" => 5];
        static $filters = ["escape" => 6, "upper" => 10];
        static $functions = [];

        try {
            $this->sandbox->checkSecurity(
                ['set', 'trans'],
                ['escape', 'upper'],
                [],
                $this->source
            );
        } catch (SecurityError $e) {
            $e->setSourceContext($this->source);

            if ($e instanceof SecurityNotAllowedTagError && 
isset($tags[$e->getTagName()])) {
                $e->setTemplateLine($tags[$e->getTagName()]);
            } elseif ($e instanceof SecurityNotAllowedFilterError && 
isset($filters[$e->getFilterName()])) {
                $e->setTemplateLine($filters[$e->getFilterName()]);
            } elseif ($e instanceof SecurityNotAllowedFunctionError && 
isset($functions[$e->getFunctionName()])) {
                $e->setTemplateLine($functions[$e->getFunctionName()]);
            }

            throw $e;
        }

    }
}

/usr/share/php/Twig/Test/IntegrationTestCase.php:129

FAILURES!
Tests: 106, Assertions: 195, Failures: 7, PHPUnit Deprecations: 1, Skipped: 5, 
Risky: 2.
make[1]: *** [debian/rules:20: override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:4: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2
--------------------------------------------------------------------------------

Reply via email to