summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-06 12:59:13 +0100
committerRemi Collet <remi@remirepo.net>2021-01-06 12:59:13 +0100
commit62148623e9e9b45031f9bc25deb3e874eed44790 (patch)
treec4a1db5a0bcf673e4bdb5dde0d635a8f0234dee0
parent1bd500ea3781830d7086871acafb62f6d0be5ea7 (diff)
update to 3.4.0
raise dependency on PHP 7 switch to classmap autoloader switch to phpunit9
-rw-r--r--.gitignore9
-rw-r--r--composer.json23
-rw-r--r--php-league-plates-autoload.php7
-rw-r--r--php-league-plates.spec67
4 files changed, 54 insertions, 52 deletions
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 @@
-<?php
-/* Autoloader for league/plates and its dependencies */
-
-require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
-
-\Fedora\Autoloader\Autoload::addPsr4('League\\Plates\\', __DIR__);
-
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 <remi@remirepo.net> - 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 <remi@fedoraproject.org> - 3.3.0-2
- update to 3.3.0
- switch to fedora/autoloader