[pkg-php-pear] Bug#1084317: php-twig: FTBFS: Failed asserting that two strings are equal.
Santiago Vila
sanvila at debian.org
Mon Oct 7 09:37:44 BST 2024
Package: src:php-twig
Version: 3.8.0-4
Severity: serious
Tags: ftbfs
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
debian/rules execute_after_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
# php-twig-doc
sphinx-build -C \
-b html \
-D source_suffix='.rst' \
-D master_doc='index' \
-D project='php-twig-doc' \
-D copyright='by the Twig Team' \
-D version='3.8' \
-D release='3.8.0' \
-D pygments_style='sphinx' \
-D html_theme='default' \
doc debian/build-tmp/php-twig-doc
Running Sphinx v7.4.7
loading translations [en]... done
making output directory... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 119 source files that are out of date
updating environment: [new config] 119 added, 0 changed, 0 removed
reading sources... [ 1%] advanced
reading sources... [ 2%] api
reading sources... [ 3%] coding_standards
reading sources... [ 3%] deprecated
reading sources... [ 4%] filters/abs
reading sources... [ 5%] filters/batch
reading sources... [ 6%] filters/capitalize
reading sources... [ 7%] filters/column
reading sources... [ 8%] filters/convert_encoding
reading sources... [ 8%] filters/country_name
reading sources... [ 9%] filters/currency_name
reading sources... [ 10%] filters/currency_symbol
reading sources... [ 11%] filters/data_uri
reading sources... [ 12%] filters/date
reading sources... [ 13%] filters/date_modify
reading sources... [ 13%] filters/default
reading sources... [ 14%] filters/escape
reading sources... [ 15%] filters/filter
reading sources... [ 16%] filters/first
reading sources... [ 17%] filters/format
reading sources... [ 18%] filters/format_currency
reading sources... [ 18%] filters/format_date
reading sources... [ 19%] filters/format_datetime
reading sources... [ 20%] filters/format_number
reading sources... [ 21%] filters/format_time
reading sources... [ 22%] filters/html_to_markdown
reading sources... [ 23%] filters/index
reading sources... [ 24%] filters/inky_to_html
reading sources... [ 24%] filters/inline_css
reading sources... [ 25%] filters/join
reading sources... [ 26%] filters/json_encode
reading sources... [ 27%] filters/keys
reading sources... [ 28%] filters/language_name
reading sources... [ 29%] filters/last
reading sources... [ 29%] filters/length
reading sources... [ 30%] filters/locale_name
reading sources... [ 31%] filters/lower
reading sources... [ 32%] filters/map
reading sources... [ 33%] filters/markdown_to_html
reading sources... [ 34%] filters/merge
reading sources... [ 34%] filters/nl2br
reading sources... [ 35%] filters/number_format
reading sources... [ 36%] filters/raw
reading sources... [ 37%] filters/reduce
reading sources... [ 38%] filters/replace
reading sources... [ 39%] filters/reverse
reading sources... [ 39%] filters/round
reading sources... [ 40%] filters/slice
reading sources... [ 41%] filters/slug
reading sources... [ 42%] filters/sort
reading sources... [ 43%] filters/spaceless
reading sources... [ 44%] filters/split
reading sources... [ 45%] filters/striptags
reading sources... [ 45%] filters/timezone_name
reading sources... [ 46%] filters/title
reading sources... [ 47%] filters/trim
reading sources... [ 48%] filters/u
reading sources... [ 49%] filters/upper
reading sources... [ 50%] filters/url_encode
reading sources... [ 50%] functions/attribute
reading sources... [ 51%] functions/block
reading sources... [ 52%] functions/constant
reading sources... [ 53%] functions/country_names
reading sources... [ 54%] functions/country_timezones
reading sources... [ 55%] functions/currency_names
reading sources... [ 55%] functions/cycle
reading sources... [ 56%] functions/date
reading sources... [ 57%] functions/dump
reading sources... [ 58%] functions/html_classes
reading sources... [ 59%] functions/include
reading sources... [ 60%] functions/index
reading sources... [ 61%] functions/language_names
reading sources... [ 61%] functions/locale_names
reading sources... [ 62%] functions/max
reading sources... [ 63%] functions/min
reading sources... [ 64%] functions/parent
reading sources... [ 65%] functions/random
reading sources... [ 66%] functions/range
reading sources... [ 66%] functions/script_names
reading sources... [ 67%] functions/source
reading sources... [ 68%] functions/template_from_string
reading sources... [ 69%] functions/timezone_names
reading sources... [ 70%] index
reading sources... [ 71%] installation
reading sources... [ 71%] internals
reading sources... [ 72%] intro
reading sources... [ 73%] recipes
reading sources... [ 74%] tags/apply
reading sources... [ 75%] tags/autoescape
reading sources... [ 76%] tags/block
reading sources... [ 76%] tags/cache
reading sources... [ 77%] tags/deprecated
reading sources... [ 78%] tags/do
reading sources... [ 79%] tags/embed
reading sources... [ 80%] tags/extends
reading sources... [ 81%] tags/flush
reading sources... [ 82%] tags/for
reading sources... [ 82%] tags/from
reading sources... [ 83%] tags/if
reading sources... [ 84%] tags/import
reading sources... [ 85%] tags/include
reading sources... [ 86%] tags/index
reading sources... [ 87%] tags/macro
reading sources... [ 87%] tags/sandbox
reading sources... [ 88%] tags/set
reading sources... [ 89%] tags/use
reading sources... [ 90%] tags/verbatim
reading sources... [ 91%] tags/with
reading sources... [ 92%] templates
reading sources... [ 92%] tests/constant
reading sources... [ 93%] tests/defined
reading sources... [ 94%] tests/divisibleby
reading sources... [ 95%] tests/empty
reading sources... [ 96%] tests/even
reading sources... [ 97%] tests/index
reading sources... [ 97%] tests/iterable
reading sources... [ 98%] tests/null
reading sources... [ 99%] tests/odd
reading sources... [100%] tests/sameas
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets...
copying static files... done
copying extra files... done
copying assets: done
writing output... [ 1%] advanced
writing output... [ 2%] api
writing output... [ 3%] coding_standards
writing output... [ 3%] deprecated
writing output... [ 4%] filters/abs
writing output... [ 5%] filters/batch
writing output... [ 6%] filters/capitalize
writing output... [ 7%] filters/column
writing output... [ 8%] filters/convert_encoding
writing output... [ 8%] filters/country_name
writing output... [ 9%] filters/currency_name
writing output... [ 10%] filters/currency_symbol
writing output... [ 11%] filters/data_uri
writing output... [ 12%] filters/date
writing output... [ 13%] filters/date_modify
writing output... [ 13%] filters/default
writing output... [ 14%] filters/escape
writing output... [ 15%] filters/filter
writing output... [ 16%] filters/first
writing output... [ 17%] filters/format
writing output... [ 18%] filters/format_currency
writing output... [ 18%] filters/format_date
writing output... [ 19%] filters/format_datetime
writing output... [ 20%] filters/format_number
writing output... [ 21%] filters/format_time
writing output... [ 22%] filters/html_to_markdown
writing output... [ 23%] filters/index
writing output... [ 24%] filters/inky_to_html
writing output... [ 24%] filters/inline_css
writing output... [ 25%] filters/join
writing output... [ 26%] filters/json_encode
writing output... [ 27%] filters/keys
writing output... [ 28%] filters/language_name
writing output... [ 29%] filters/last
writing output... [ 29%] filters/length
writing output... [ 30%] filters/locale_name
writing output... [ 31%] filters/lower
writing output... [ 32%] filters/map
writing output... [ 33%] filters/markdown_to_html
writing output... [ 34%] filters/merge
writing output... [ 34%] filters/nl2br
writing output... [ 35%] filters/number_format
writing output... [ 36%] filters/raw
writing output... [ 37%] filters/reduce
writing output... [ 38%] filters/replace
writing output... [ 39%] filters/reverse
writing output... [ 39%] filters/round
writing output... [ 40%] filters/slice
writing output... [ 41%] filters/slug
writing output... [ 42%] filters/sort
writing output... [ 43%] filters/spaceless
writing output... [ 44%] filters/split
writing output... [ 45%] filters/striptags
writing output... [ 45%] filters/timezone_name
writing output... [ 46%] filters/title
writing output... [ 47%] filters/trim
writing output... [ 48%] filters/u
writing output... [ 49%] filters/upper
writing output... [ 50%] filters/url_encode
writing output... [ 50%] functions/attribute
writing output... [ 51%] functions/block
writing output... [ 52%] functions/constant
writing output... [ 53%] functions/country_names
writing output... [ 54%] functions/country_timezones
writing output... [ 55%] functions/currency_names
writing output... [ 55%] functions/cycle
writing output... [ 56%] functions/date
writing output... [ 57%] functions/dump
writing output... [ 58%] functions/html_classes
writing output... [ 59%] functions/include
writing output... [ 60%] functions/index
writing output... [ 61%] functions/language_names
writing output... [ 61%] functions/locale_names
writing output... [ 62%] functions/max
writing output... [ 63%] functions/min
writing output... [ 64%] functions/parent
writing output... [ 65%] functions/random
writing output... [ 66%] functions/range
writing output... [ 66%] functions/script_names
writing output... [ 67%] functions/source
writing output... [ 68%] functions/template_from_string
writing output... [ 69%] functions/timezone_names
writing output... [ 70%] index
writing output... [ 71%] installation
writing output... [ 71%] internals
writing output... [ 72%] intro
writing output... [ 73%] recipes
writing output... [ 74%] tags/apply
writing output... [ 75%] tags/autoescape
writing output... [ 76%] tags/block
writing output... [ 76%] tags/cache
writing output... [ 77%] tags/deprecated
writing output... [ 78%] tags/do
writing output... [ 79%] tags/embed
writing output... [ 80%] tags/extends
writing output... [ 81%] tags/flush
writing output... [ 82%] tags/for
writing output... [ 82%] tags/from
writing output... [ 83%] tags/if
writing output... [ 84%] tags/import
writing output... [ 85%] tags/include
writing output... [ 86%] tags/index
writing output... [ 87%] tags/macro
writing output... [ 87%] tags/sandbox
writing output... [ 88%] tags/set
writing output... [ 89%] tags/use
writing output... [ 90%] tags/verbatim
writing output... [ 91%] tags/with
writing output... [ 92%] templates
writing output... [ 92%] tests/constant
writing output... [ 93%] tests/defined
writing output... [ 94%] tests/divisibleby
writing output... [ 95%] tests/empty
writing output... [ 96%] tests/even
writing output... [ 97%] tests/index
writing output... [ 97%] tests/iterable
writing output... [ 98%] tests/null
writing output... [ 99%] tests/odd
writing output... [100%] tests/sameas
generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
The HTML pages are in debian/build-tmp/php-twig-doc.
# php-twig
phpab --output src/autoload.php src
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory src
Autoload file src/autoload.php generated.
# php-twig testsuite
mkdir --parents vendor Twig/Extra
phpab --output vendor/autoload.php \
--template debian/autoload.tests.php.tpl \
tests extra/*/Tests
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory tests
Scanning directory extra/cache-extra/Tests
Scanning directory extra/cssinliner-extra/Tests
Scanning directory extra/html-extra/Tests
Scanning directory extra/inky-extra/Tests
Scanning directory extra/intl-extra/Tests
Scanning directory extra/markdown-extra/Tests
Scanning directory extra/string-extra/Tests
Scanning directory extra/twig-extra-bundle/Tests
Autoload file vendor/autoload.php generated.
# Mimic install path
cp -r src/* Twig
cp -r extra/cache-extra Twig/Extra/Cache
cp -r extra/cssinliner-extra Twig/Extra/CssInliner
cp -r extra/html-extra Twig/Extra/Html
cp -r extra/inky-extra Twig/Extra/Inky
cp -r extra/intl-extra Twig/Extra/Intl
cp -r extra/markdown-extra Twig/Extra/Markdown
cp -r extra/string-extra Twig/Extra/String
cp -r extra/twig-extra-bundle Twig/Extra/TwigExtraBundle
# php-twig extra
# Parts from the symfony package’s debian/rules.
mkdir --parents debian/packages_to_build debian/autoloaders
# Walk through the parts of upstream's code that should be packaged into
# separate Debian binary packages and write down a package-to-build info
# file containing shell variables for each package.
# Those files will be traverse later on in different targets of this
# makefile (debian/rules). They solely exists to not repeat the extraction
# of those variables in each of those target over and over again.
# Then, build a class loader for the package, using the template in
# debian/eb_pkg_name.autoload.php.tpl if it exists (to load dependencies).
set -e;\
for src_path in $(find -L Twig/Extra/ -mindepth 1 -maxdepth 1 -type d); do \
if [ -e $src_path/composer.json ]; then \
deb_pkg_name=php-$(cat $src_path/composer.json | jq -r '.name | tostring' | sed -r 's|/|-|'); \
if [ $(grep -c -E -e "^Package: $deb_pkg_name\$" debian/control) -ne 1 ]; then \
echo "W: No Debian package '$deb_pkg_name' defined in debian/control," 1>&2; \
echo " therefor not considering Symfony $src_path," 1>&2; \
continue; \
fi; \
echo "# This file contains some variables sourced" > debian/packages_to_build/$deb_pkg_name; \
echo "# by various targets in debian/rules" >> debian/packages_to_build/$deb_pkg_name; \
echo "deb_pkg_name='$deb_pkg_name'" >> debian/packages_to_build/$deb_pkg_name; \
echo "src_path='$src_path'" >> debian/packages_to_build/$deb_pkg_name; \
echo "twig ${deb_pkg_name#php-twig-} $src_path/autoload.php" > debian/autoloaders/$deb_pkg_name; \
phpab \
--blacklist '*\\tests\\*' \
--output $src_path/autoload.php \
--template debian/$deb_pkg_name.autoload.php.tpl \
$src_path; \
fi; \
done
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Intl
Autoload file Twig/Extra/Intl/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/TwigExtraBundle
Autoload file Twig/Extra/TwigExtraBundle/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Markdown
Autoload file Twig/Extra/Markdown/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Cache
Autoload file Twig/Extra/Cache/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Html
Autoload file Twig/Extra/Html/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/CssInliner
Autoload file Twig/Extra/CssInliner/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/String
Autoload file Twig/Extra/String/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Inky
Autoload file Twig/Extra/Inky/autoload.php generated.
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
SYMFONY_DEPRECATIONS_HELPER=weak phpunit
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.
Testing
............................................................. 61 / 1672 ( 3%)
............................................................. 122 / 1672 ( 7%)
............................................................. 183 / 1672 ( 10%)
............................................................. 244 / 1672 ( 14%)
......................R...................................... 305 / 1672 ( 18%)
..........................................S.................. 366 / 1672 ( 21%)
......................................................S...... 427 / 1672 ( 25%)
............................................................. 488 / 1672 ( 29%)
............................................................. 549 / 1672 ( 32%)
............................................................. 610 / 1672 ( 36%)
............................................................. 671 / 1672 ( 40%)
............................................................. 732 / 1672 ( 43%)
...........................S................................. 793 / 1672 ( 47%)
............................................................. 854 / 1672 ( 51%)
............................................................. 915 / 1672 ( 54%)
............................................................. 976 / 1672 ( 58%)
............................................................. 1037 / 1672 ( 62%)
............................................................. 1098 / 1672 ( 65%)
............................................................. 1159 / 1672 ( 69%)
............................................................. 1220 / 1672 ( 72%)
............................................................. 1281 / 1672 ( 76%)
............................................................. 1342 / 1672 ( 80%)
............................................................. 1403 / 1672 ( 83%)
............................................................. 1464 / 1672 ( 87%)
............................................................. 1525 / 1672 ( 91%)
............................................................. 1586 / 1672 ( 94%)
............................................................. 1647 / 1672 ( 98%)
......................... 1672 / 1672 (100%)
Time: 00:00.470, Memory: 36.00 MB
There was 1 risky test:
1) Twig\Tests\Extension\SandboxTest::testMultipleClassMatchesViaInheritanceInAllowedMethods
This test did not perform any assertions
/<<PKGBUILDDIR>>/tests/Extension/SandboxTest.php:416
OK, but incomplete, skipped, or risky tests!
Tests: 1672, Assertions: 4416, Skipped: 3, Risky: 1.
Legacy deprecation notices (3)
Other deprecation notices (9)
# testsuite for extra packages
set -e; \
for package_info_file in $(find debian/packages_to_build/ -mindepth 1 -maxdepth 1 -type f); do \
. $package_info_file; \
if [ -f $src_path/phpunit.xml.dist ]; then \
LC_ALL=en_US SYMFONY_DEPRECATIONS_HELPER=weak phpunit \
--bootstrap vendor/autoload.php \
--configuration $src_path/phpunit.xml.dist \
$src_path; \
fi; \
done
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
.S 2 / 2 (100%)
Time: 00:00.017, Memory: 8.00 MB
OK, but incomplete, skipped, or risky tests!
Tests: 2, Assertions: 10, Skipped: 1.
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
..............FCompiled templates that failed on case 1:
Template: index.twig
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* index.twig */
class __TwigTemplate_fbc6207c9a560b7f036961318f551fb2_68ad9d2cf30914402978b555df8a60d5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "
";
// line 2
echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->getCurrencyNames("UNKNOWN")), "html", null, true);
echo "
";
// line 3
echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->getCurrencyNames()), "html", null, true);
echo "
";
// line 4
echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->getCurrencyNames("fr")), "html", null, true);
echo "
";
// line 5
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Twig\Extra\Intl\IntlExtension']->getCurrencyNames(), "USD", [], "array", false, false, false, 5), "html", null, true);
echo "
";
// line 6
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Twig\Extra\Intl\IntlExtension']->getCurrencyNames("fr"), "USD", [], "array", false, false, false, 6), "html", null, true);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "index.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 56 => 6, 52 => 5, 48 => 4, 44 => 3, 40 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "index.twig", "");
}
}
..S.... 22 / 22 (100%)
Time: 00:00.037, Memory: 10.00 MB
There was 1 failure:
1) Twig\Extra\Intl\Tests\IntegrationTest::testIntegration with data set #14 ('currency_names.test', '"currency_names" function', '', array('\n{{ currency_names('UNKNOWN'...D'] }}'), false, array(array('--DATA--\nreturn [];\n--EXPEC...s-Unis', '\nreturn [];\n', '', '\n0\n292\n292\nUS Dollar\ndol...s-Unis')), '')
"currency_names" function (in currency_names.test)
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
'0\n
-292\n
-292\n
+293\n
+293\n
US Dollar\n
dollar des États-Unis'
/<<PKGBUILDDIR>>/Twig/Test/IntegrationTestCase.php:252
/<<PKGBUILDDIR>>/Twig/Test/IntegrationTestCase.php:82
FAILURES!
Tests: 22, Assertions: 41, Failures: 1, Skipped: 1.
make[1]: *** [debian/rules:75: override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202410/
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 could not 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 affects, so that this is still visible in the BTS web
page for this package.
Thanks.
More information about the pkg-php-pear
mailing list