From 62148623e9e9b45031f9bc25deb3e874eed44790 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Jan 2021 12:59:13 +0100 Subject: update to 3.4.0 raise dependency on PHP 7 switch to classmap autoloader switch to phpunit9 --- php-league-plates.spec | 67 +++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 39 deletions(-) (limited to 'php-league-plates.spec') diff --git a/php-league-plates.spec b/php-league-plates.spec index 3810789..dc69451 100644 --- a/php-league-plates.spec +++ b/php-league-plates.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-league-plates # -# Copyright (c) 2016-2017 Remi Collet +# Copyright (c) 2016-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # Github -%global gh_commit b1684b6f127714497a0ef927ce42c0b44b45a8af +%global gh_commit 6d3ee31199b536a4e003b34a356ca20f6f75496a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner thephpleague %global gh_project plates @@ -19,8 +19,8 @@ %global ns_project Plates Name: php-%{pk_vendor}-%{pk_name} -Version: 3.3.0 -Release: 2%{?dist} +Version: 3.4.0 +Release: 1%{?dist} Summary: Native PHP template system Group: Development/Libraries @@ -29,26 +29,24 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz # Create git snapshot as tests are excluded from official tarball Source1: makesrc.sh -# Autoloader -Source2: %{name}-autoload.php -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: php(language) >= 5.3 +# as we use phpunit9 +BuildRequires: php(language) >= 7.3 BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { -# "mikey179/vfsStream": "^1.4", -# "phpunit/phpunit": "~4.0", -# "squizlabs/php_codesniffer": "~1.5" -BuildRequires: php-composer(mikey179/vfsStream) >= 1.4 -BuildRequires: php-composer(phpunit/phpunit) >= 4.0 +# "mikey179/vfsstream": "^1.6", +# "phpunit/phpunit": "^9.5", +# "squizlabs/php_codesniffer": "^3.5" +BuildRequires: php-composer(mikey179/vfsStream) >= 1.6 +BuildRequires: phpunit9 >= 9.5 # Autoloader -BuildRequires: php-composer(fedora/autoloader) +BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": "^5.3 | ^7.0" -Requires: php(language) >= 5.3 +# "php": "^7.0|^8.0" +Requires: php(language) >= 7.0 # From phpcompatifo report for 3.1.1 Requires: php-pcre Requires: php-spl @@ -71,16 +69,13 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -install -pm 644 %{SOURCE2} src/autoload.php - %build -# Nothing +: Generate classmap autoloader +phpab --template fedora --output src/autoload.php src %install -rm -rf %{buildroot} - # Restore PSR-0 tree mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} @@ -99,30 +94,18 @@ require_once '%{_datadir}/php/org/bovigo/vfs/autoload.php'; EOF : Run upstream test suite -# remirepo:11 -run=0 ret=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose -# remirepo:2 -fi +for cmd in php php73 php74 php80; do + if which $cmd; then + $cmd %{_bindir}/phpunit9 || ret=1 + fi +done exit $ret -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -131,6 +114,12 @@ rm -rf %{buildroot} %changelog +* Wed Jan 6 2021 Remi Collet - 3.4.0-1 +- update to 3.4.0 +- raise dependency on PHP 7 +- switch to classmap autoloader +- switch to phpunit9 + * Wed Dec 28 2016 Remi Collet - 3.3.0-2 - update to 3.3.0 - switch to fedora/autoloader -- cgit