diff --git a/.gitignore b/.gitignore index c7420a3..6bbc88a 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,15 @@ clog /php-twig-1.42.1-671347603760a88b1e7288aaa9378f33687d7edf.tar.gz /php-twig-1.42.2-21707d6ebd05476854805e4f91b836531941bcd4.tar.gz /php-twig-1.42.3-201baee843e0ffe8b0b956f336dd42b2a92fae4e.tar.gz +/php-twig-1.42.4-e587180.tgz +/php-twig-1.42.5-87b2ea9.tgz +/php-twig-1.43.0-597a03e.tgz +/php-twig-1.43.1-2311602.tgz +/php-twig-1.44.0-e7c93a4.tgz +/php-twig-1.44.1-04b15d4.tgz +/php-twig-1.44.2-138c493.tgz +/php-twig-1.44.3-920a9b9.tgz +/php-twig-1.44.4-4d40042.tgz +/php-twig-1.44.5-dd43533.tgz +/php-twig-1.44.6-ae39480.tgz +/php-twig-1.44.7-0887422.tgz diff --git a/composer.json b/composer.json index 9807aa7..46b0fc7 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "keywords": ["templating"], "homepage": "https://twig.symfony.com", "license": "BSD-3-Clause", + "minimum-stability": "dev", "authors": [ { "name": "Fabien Potencier", @@ -14,7 +15,6 @@ }, { "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" }, { @@ -24,12 +24,11 @@ } ], "require": { - "php": ">=5.5.0", + "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4@dev|^5.0", - "symfony/debug": "^3.4|^4.2", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9", "psr/container": "^1.0" }, "autoload": { @@ -47,7 +46,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.42-dev" + "dev-master": "1.44-dev" } } } diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..97be9f6 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global github_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global github_name/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^%global github_version/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global github_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +echo "Cloning..." +rm -rf $PROJECT-$COMMIT +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-twig.spec b/php-twig.spec index 81d53df..041fe1d 100644 --- a/php-twig.spec +++ b/php-twig.spec @@ -1,7 +1,7 @@ # # Fedora spec file for php-twig # -# Copyright (c) 2014-2019 Shawn Iwinski +# Copyright (c) 2014-2022 Shawn Iwinski # Remi Collet # # License: MIT @@ -10,46 +10,45 @@ # 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.3 -%global github_commit 201baee843e0ffe8b0b956f336dd42b2a92fae4e +%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} Name: php-%{composer_project} Version: %{github_version} -Release: 1%{?dist} +Release: 9%{?dist} Summary: The flexible, fast, and secure template engine for PHP -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD URL: http://twig.sensiolabs.org -Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +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 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +%if %{with tests} 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) -%else -BuildRequires: php-symfony3-debug >= 3.4 -BuildRequires: php-composer(psr/container) < 2 -BuildRequires: php-composer(psr/container) >= 1.0 -%endif +%global phpunit %{_bindir}/phpunit9 +BuildRequires: %{phpunit} ## phpcompatinfo (computed from version 1.42.2) BuildRequires: php-ctype BuildRequires: php-date @@ -94,7 +93,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 @@ -142,7 +141,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 @@ -155,27 +154,25 @@ 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 -%{!?_licensedir:%global license %%doc} %license LICENSE %doc CHANGELOG README.rst composer.json # Lib @@ -183,6 +180,93 @@ exit $ret %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.44.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 1.44.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 4 2024 Miroslav Suchý - 1.44.7-7 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 1.44.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.44.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.44.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 1.44.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 1.44.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Sep 29 2022 Remi Collet - 1.44.7-1 +- update to 1.44.7 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.44.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 1.44.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Nov 25 2021 Remi Collet - 1.44.6-1 +- update to 1.44.6 (no change) +- drop patch merged upstream + +* Wed Sep 22 2021 Remi Collet - 1.44.5-1 +- update to 1.44.5 +- add patch for test suite from https://github.com/twigphp/Twig/pull/3563 + +* Tue Jul 27 2021 Fedora Release Engineering - 1.44.4-2 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Remi Collet - 1.44.4-1 +- update to 1.44.4 + +* Wed May 12 2021 Remi Collet - 1.44.3-1 +- update to 1.44.3 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.44.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 6 2021 Remi Collet - 1.44.2-1 +- update to 1.44.2 + +* Wed Oct 28 2020 Remi Collet - 1.44.1-1 +- update to 1.44.1 + +* Wed Oct 21 2020 Remi Collet - 1.44.0-1 +- update to 1.44.0 +- raise dependency on PHP 7.2.5 + +* Tue Aug 11 2020 Remi Collet - 1.43.1-1 +- update to 1.43.1 +- switch to phpunit9 +- skip 1 more test with PHP 8.0 + +* Tue Jul 28 2020 Fedora Release Engineering - 1.43.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 6 2020 Remi Collet - 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 - 1.42.5-1 +- update to 1.42.5 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.42.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 12 2019 Remi Collet - 1.42.4-1 +- update to 1.42.4 +- sources from git snapshot + * Tue Aug 27 2019 Remi Collet - 1.42.3-1 - update to 1.42.3 - use symfony/debug v3 diff --git a/sources b/sources index 9989652..a2b94d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-twig-1.42.3-201baee843e0ffe8b0b956f336dd42b2a92fae4e.tar.gz) = 617b303b4c8a10347125553c7ab48d5522a751d41e7eec51d125379a731f14bf2b912cecf4367201fe029352f25acf66bc29f084d9217fd8809b4f7e5f21e89a +SHA512 (php-twig-1.44.7-0887422.tgz) = 7dbf734b7113dd0e1be34710d4a369cd902ab955346c4348a003a9844c8d55316f0f0713fe208d2b62f03cf4c799885432f79162b1c62c7b9304862f5b7c89b0