From 3352ad2737ddd153ad67b778ea96462f893d2185 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Oct 2019 11:01:34 +0200 Subject: - update to 2.12.0 - use phpunit7 and Symfony 4 for test suite --- composer.json | 10 +++++----- php-twig2.spec | 29 +++++++++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index b0c5836..567d263 100644 --- a/composer.json +++ b/composer.json @@ -29,8 +29,8 @@ "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony/phpunit-bridge": "^3.4.19|^4.1.8|^5.0", - "symfony/debug": "^2.7", + "symfony/phpunit-bridge": "^4.4@dev|^5.0", + "symfony/debug": "^3.4|^4.2", "psr/container": "^1.0" }, "autoload": { @@ -42,13 +42,13 @@ } }, "autoload-dev": { - "psr-0" : { - "Twig_Tests_" : "test/" + "psr-4" : { + "Twig\\Tests\\" : "tests/" } }, "extra": { "branch-alias": { - "dev-master": "2.11-dev" + "dev-master": "2.12-dev" } } } diff --git a/php-twig2.spec b/php-twig2.spec index 89883fb..6c6a8ec 100644 --- a/php-twig2.spec +++ b/php-twig2.spec @@ -13,7 +13,7 @@ %global with_tests 0%{!?_without_tests:1} %global github_owner twigphp %global github_name Twig -%global github_commit 699ed2342557c88789a15402de5eb834dedd6792 +%global github_commit c7a85fd08348ca04b4d8f234f49583d9910906aa %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global composer_vendor twig @@ -24,7 +24,7 @@ %global phpdir %{_datadir}/php Name: php-%{composer_project}2 -Version: 2.11.3 +Version: 2.12.0 Release: 1%{?dist} Summary: The flexible, fast, and secure template engine for PHP @@ -37,16 +37,16 @@ BUildArch: noarch BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # For tests -BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit6 +BuildRequires: php(language) >= 7.1 +BuildRequires: phpunit7 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(symfony/debug) >= 2.7 with php-composer(symfony/debug) < 3) +BuildRequires: (php-composer(symfony/debug) >= 4.2 with php-composer(symfony/debug) < 5) BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) BuildRequires: (php-composer(symfony/polyfill-mbstring) >= 1.3 with php-composer(symfony/polyfill-mbstring) < 2) # remirepo:7 %else -BuildRequires: php-symfony-debug >= 2.7 +BuildRequires: php-symfony3-debug >= 3.4 BuildRequires: php-composer(psr/container) < 2 BuildRequires: php-composer(psr/container) >= 1.0 BuildRequires: php-symfony-polyfill < 2 @@ -141,15 +141,20 @@ cp -rp lib/Twig %{buildroot}%{phpdir}/Twig2 %if %{with_tests} mkdir vendor -phpab --output vendor/autoload.php test +phpab --output vendor/autoload.php tests cat << 'EOF' | tee -a vendor/autoload.php // This library require_once '%{buildroot}%{phpdir}/Twig2/autoload.php'; // Dependencies (require-dev) -require_once '%{phpdir}/Symfony/Component/Debug/autoload.php'; -require_once '%{phpdir}/Psr/Container/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + [ + '%{phpdir}/Symfony4/Component/Debug/autoload.php', + '%{phpdir}/Symfony3/Component/Debug/autoload.php', + ], + '%{phpdir}/Psr/Container/autoload.php', +]); EOF : Disable listener from symfony/phpunit-bridge ~3.2 @@ -159,7 +164,7 @@ RETURN_CODE=0 : Upstream tests with SCLs if available for SCL in php php71 php72 php73 php74; do if which $SCL; then - $SCL %{_bindir}/phpunit6 --verbose || RETURN_CODE=1 + $SCL %{_bindir}/phpunit7 --verbose || RETURN_CODE=1 fi done exit $RETURN_CODE @@ -177,6 +182,10 @@ exit $RETURN_CODE %changelog +* Mon Oct 7 2019 Remi Collet - 2.12.0-1 +- update to 2.12.0 +- use phpunit7 and Symfony 4 for test suite + * Tue Jun 18 2019 Shawn Iwinski - 2.11.3-1 - Update to 2.11.3 -- cgit