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 --- .gitignore | 9 ++++++ composer.json | 23 +++++++++++---- php-league-plates-autoload.php | 7 ----- php-league-plates.spec | 67 ++++++++++++++++++------------------------ 4 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 .gitignore delete mode 100644 php-league-plates-autoload.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index 8971a98..de9f1f7 100644 --- a/composer.json +++ b/composer.json @@ -8,34 +8,45 @@ "templates", "views" ], - "homepage": "http://platesphp.com", + "homepage": "https://platesphp.com", "license": "MIT", "authors" : [ { "name": "Jonathan Reinink", "email": "jonathan@reinink.ca", "role": "Developer" + }, + { + "name": "RJ Garcia", + "email": "ragboyjr@icloud.com", + "role": "Developer" } ], "require" : { - "php": "^5.3 | ^7.0" + "php": "^7.0|^8.0" }, "require-dev": { - "mikey179/vfsStream": "^1.4", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "psr-4": { "League\\Plates\\": "src" } }, + "autoload-dev": { + "psr-4": { + "League\\Plates\\Tests\\": "tests" + } + }, "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "scripts": { - "test": "phpunit" + "test": "phpunit --testdox", + "docs": "hugo -s doc server" } } diff --git a/php-league-plates-autoload.php b/php-league-plates-autoload.php deleted file mode 100644 index 62ff099..0000000 --- a/php-league-plates-autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -= 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