diff --git a/.gitignore b/.gitignore index 35aab8e..b09c9f9 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ clog /php-twig-1.32.0-9935b662e24d6e634da88901ab534cc12e8c728f.tar.gz /php-twig-1.33.0-05cf49921b13f6f01d3cfdf9018cfa7a8086fd5a.tar.gz /php-twig-1.33.2-dd6ca96227917e1e85b41c7c3cc6507b411e0927.tar.gz +/php-twig-1.34.2-55e4beb721a044db9e31ae0470024fc205b6a008.tar.gz diff --git a/php-twig.spec b/php-twig.spec index 020dfa0..0e198c5 100644 --- a/php-twig.spec +++ b/php-twig.spec @@ -12,8 +12,8 @@ %global github_owner twigphp %global github_name Twig -%global github_version 1.33.2 -%global github_commit dd6ca96227917e1e85b41c7c3cc6507b411e0927 +%global github_version 1.34.2 +%global github_commit 55e4beb721a044db9e31ae0470024fc205b6a008 %if 0%{?fedora} < 25 %global with_ext 1 @@ -58,10 +58,11 @@ BuildRequires: php-devel >= %{php_min_ver} # Tests %if %{with_tests} BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: php-composer(symfony/phpunit-bridge) +BuildRequires: php-composer(symfony/debug) < 3 BuildRequires: php-composer(symfony/debug) >= 2.7 +BuildRequires: php-composer(psr/container) < 2 BuildRequires: php-composer(psr/container) >= 1.0 -## phpcompatinfo (computed from version 1.26.0) +## phpcompatinfo (computed from version 1.34.2) BuildRequires: php-ctype BuildRequires: php-date BuildRequires: php-dom @@ -73,11 +74,13 @@ BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # Lib ## composer.json Requires: php(language) >= %{php_min_ver} -## phpcompatinfo (computed from version 1.26.0) +## phpcompatinfo (computed from version 1.34.2) Requires: php-ctype Requires: php-date Requires: php-dom @@ -93,6 +96,8 @@ Requires: php-spl Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %endif +# Autoloader +Requires: php-composer(fedora/autoloader) # Lib ## Composer @@ -157,21 +162,11 @@ extension=%{ext_name}.so INI %endif +: Move the PSR-4 compat library +mv src lib/Twig/psr4 + : Create lib autoloader -cat <<'AUTOLOAD' | tee lib/Twig/autoload.php - phpunit.xml -fi +: Disable listener from symfony/phpunit-bridge ~3.2 +sed -e '/listener/d' phpunit.xml.dist > phpunit.xml : Skip tests known to fail sed -e 's#function testGetAttributeExceptions#function SKIP_testGetAttributeExceptions#' \ @@ -263,13 +257,20 @@ sed 's/function testGetAttributeWithTemplateAsObject/function SKIP_testGetAttrib %endif : Test suite without extension -%{_bindir}/phpunit --verbose +ret=0 +for cmd in php php56 php70 php71 php72; do + if which $cmd; then + $cmd %{_bindir}/phpunit --verbose || ret=1 + fi +done %if %{with_ext} : Test suite with extension %{_bindir}/php --define extension=ext/NTS/modules/%{ext_name}.so \ - %{_bindir}/phpunit --verbose + %{_bindir}/phpunit --verbose || ret=1 %endif + +exit $ret %else : Tests skipped %endif @@ -295,6 +296,13 @@ sed 's/function testGetAttributeWithTemplateAsObject/function SKIP_testGetAttrib %changelog +* Tue Jun 6 2017 Remi Collet - 1.34.2-1 +- Update to 1.34.2 +- raise dependency on PHP 5.3.3 +- add namespaced compat library +- switch to fedora/autoloader +- drop build dependency on symfony/phpunit-bridge + * Mon Apr 24 2017 Remi Collet - 1.33.2-1 - Update to 1.33.2 diff --git a/sources b/sources index 39ba112..b6bcd3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-twig-1.33.2-dd6ca96227917e1e85b41c7c3cc6507b411e0927.tar.gz) = b0e958760cba881ec4b04018b79d86a6b76b317803f9655a549d7eee41e5daaf3991885e5b77b804a036cfa429f0a23a1fa7e66d57e318ab991ca313b88d94d3 +SHA512 (php-twig-1.34.2-55e4beb721a044db9e31ae0470024fc205b6a008.tar.gz) = 290e0fcb479ab4684945efb03295e8901a5f755ccabaed524c88b48dc455c94c89d853e93899b003aa106c59e1944df6bcec45beb21105e4d12115118e470258