summaryrefslogtreecommitdiffstats
path: root/php-twig.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-twig.spec')
-rw-r--r--php-twig.spec92
1 files changed, 68 insertions, 24 deletions
diff --git a/php-twig.spec b/php-twig.spec
index 4e8a4d4..4331931 100644
--- a/php-twig.spec
+++ b/php-twig.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-twig
#
-# Copyright (c) 2014-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2014-2022 Shawn Iwinski <shawn.iwinski@gmail.com>
# Remi Collet <remi@fedoraproject.org>
#
# License: MIT
@@ -11,21 +11,21 @@
# Please preserve changelog entries
#
+# Build using "--without tests" to disable tests
+%bcond_without tests
+
%global github_owner twigphp
%global github_name Twig
-%global github_version 1.42.4
-%global github_commit e587180584c3d2d6cb864a0454e777bb6dcb6152
+%global github_version 1.44.7
+%global github_commit 0887422319889e442458e48e2f3d9add1a172ad5
%global github_short %(c=%{github_commit}; echo ${c:0:7})
# Lib
%global composer_vendor twig
%global composer_project twig
-# "php": ">=5.5.0"
-%global php_min_ver 5.5
-
-# Build using "--without tests" to disable tests
-%global with_tests 0%{!?_without_tests:1}
+# "php": ">=7.2.5"
+%global php_min_ver 7.2.5
%{!?phpdir: %global phpdir %{_datadir}/php}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
@@ -41,18 +41,22 @@ Source0: %{name}-%{github_version}-%{github_short}.tgz
Source1: makesrc.sh
BuildArch: noarch
-BuildRequires: php-devel >= %{php_min_ver}
+# as we use phpunit9 (for assertFileDoesNotExist)
+BuildRequires: php-devel >= 7.3
# Tests
-%if %{with_tests}
-BuildRequires: phpunit7
+%if %{with tests}
+# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(symfony/debug) >= 3.4 with php-composer(symfony/debug) < 4)
BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
+# remirepo:5
%else
BuildRequires: php-symfony3-debug >= 3.4
-BuildRequires: php-composer(psr/container) < 2
-BuildRequires: php-composer(psr/container) >= 1.0
+BuildRequires: php-psr-container < 2
+BuildRequires: php-psr-container >= 1.0
%endif
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: %{phpunit}
## phpcompatinfo (computed from version 1.42.2)
BuildRequires: php-ctype
BuildRequires: php-date
@@ -97,7 +101,7 @@ Provides: php-twig-Twig = %{version}-%{release}
Provides: php-pear(pear.twig-project.org/Twig) = %{version}
# This pkg was the only one in this channel so the channel is no longer needed
-Obsoletes: php-channel-twig
+Obsoletes: php-channel-twig < 1.4
%description
@@ -145,7 +149,7 @@ cp -rp lib/* %{buildroot}%{phpdir}/
%{_bindir}/php -r 'require_once "%{buildroot}%{phpdir}/Twig/autoload.php";
exit(version_compare("%{version}", Twig\Environment::VERSION, "=") ? 0 : 1);'
-%if %{with_tests}
+%if %{with tests}
: Generate autoloader
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
@@ -158,26 +162,26 @@ require_once '%{buildroot}%{phpdir}/Twig/autoload.php';
));
EOF
-: Disable listener from symfony/phpunit-bridge ^4.4@dev
+: Disable listener from symfony/phpunit-bridge # ^4.4.9|^5.0.9
sed -e '/listener/d' phpunit.xml.dist > phpunit.xml
: Test suite without extension
ret=0
-for cmd in php php71 php72 php73 php74; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit7 \
- --filter '^((?!(testGetAttributeExceptions|testGetAttributeWithTemplateAsObject)).)*$' \
- --verbose || ret=1
- fi
+for SCL in "php %{phpunit}" php74 php80 php81 php82; do
+ if which $SCL; then
+ set $SCL
+ $1 ${2:-%{_bindir}/phpunit9} $SKIP \
+ --verbose || RETURN_CODE=1
+ fi
done
-
-exit $ret
+exit $RETURN_CODE
%else
: Tests skipped
%endif
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGELOG README.rst composer.json
@@ -186,6 +190,46 @@ exit $ret
%changelog
+* Thu Sep 29 2022 Remi Collet <remi@remirepo.net> - 1.44.7-1
+- update to 1.44.7
+
+* Thu Nov 25 2021 Remi Collet <remi@remirepo.net> - 1.44.6-1
+- update to 1.44.6 (no change)
+- drop patch merged upstream
+
+* Wed Sep 22 2021 Remi Collet <remi@remirepo.net> - 1.44.5-1
+- update to 1.44.5
+- add patch for test suite from https://github.com/twigphp/Twig/pull/3563
+
+* Mon May 17 2021 Remi Collet <remi@remirepo.net> - 1.44.4-1
+- update to 1.44.4
+
+* Wed May 12 2021 Remi Collet <remi@remirepo.net> - 1.44.3-1
+- update to 1.44.3
+
+* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 1.44.2-1
+- update to 1.44.2
+
+* Wed Oct 28 2020 Remi Collet <remi@remirepo.net> - 1.44.1-1
+- update to 1.44.1
+
+* Wed Oct 21 2020 Remi Collet <remi@remirepo.net> - 1.44.0-1
+- update to 1.44.0
+- raise dependency on PHP 7.2.5
+
+* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 1.43.1-1
+- update to 1.43.1
+- switch to phpunit9
+- skip 1 more test with PHP 8.0
+
+* Mon Jul 6 2020 Remi Collet <remi@remirepo.net> - 1.43.0-1
+- update to 1.43.0
+- raise dependency on PHP 7.1.3
+- switch to phpunit8
+
+* Wed Feb 12 2020 Remi Collet <remi@remirepo.net> - 1.42.5-1
+- update to 1.42.5
+
* Tue Nov 12 2019 Remi Collet <remi@remirepo.net> - 1.42.4-1
- update to 1.42.4
- sources from git snapshot