summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-21 11:27:01 +0100
committerRemi Collet <remi@remirepo.net>2020-12-21 11:27:01 +0100
commit7e65e8531c7a123f840fdb47d23dfa1cb4134081 (patch)
tree864348a0f86a3fda9c6f79e314a90ccdc71417c5
parent7014983e1e90cb696a194602a95401d417cf377d (diff)
update to 2.5.0
switch to classmap autoloader
-rw-r--r--composer.json21
-rw-r--r--php-tecnickcom-tc-lib-pdf-page.spec61
2 files changed, 47 insertions, 35 deletions
diff --git a/composer.json b/composer.json
index 6098842..7a422e0 100644
--- a/composer.json
+++ b/composer.json
@@ -21,22 +21,23 @@
"php": ">=5.4",
"ext-date": "*",
"ext-zlib": "*",
- "tecnickcom/tc-lib-color": "^1.12.15",
- "tecnickcom/tc-lib-pdf-encrypt": "^1.5.10"
+ "tecnickcom/tc-lib-color": "^1.14",
+ "tecnickcom/tc-lib-pdf-encrypt": "^1.6.0"
},
"require-dev": {
- "apigen/apigen": "^4.1.2",
- "bartlett/php-compatinfo": "^5.0.10 || ^5.0.12",
- "pdepend/pdepend": "^2.5.2",
- "phploc/phploc": "^2.1 || ^3.0 || ^4.0",
- "phpmd/phpmd": "^2.6.0",
- "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.1",
- "sebastian/phpcpd": "^2.0 || ^3.0 || ^4.0",
- "squizlabs/php_codesniffer": "^2.8.0 || ^3.2.0"
+ "pdepend/pdepend": "2.8.0",
+ "phploc/phploc": "7.0.2 || 6.0.2 || 5.0.0 || 4.0.1 || 3.0.1 || 2.1.5",
+ "phpmd/phpmd": "2.9.1",
+ "phpunit/phpunit": "9.5.0 || 8.5.13 || 7.5.20 || 6.5.14 || 5.7.27 || 4.8.36",
+ "sebastian/phpcpd": "6.0.3 || 5.0.2 || 4.1.0 || 3.0.1 || 2.0.4",
+ "squizlabs/php_codesniffer": "3.5.8 || 2.9.2"
},
"autoload": {
"psr-4": {
"Com\\Tecnick\\Pdf\\Page\\": "src"
}
+ },
+ "autoload-dev": {
+ "psr-4": { "Test\\": "test" }
}
}
diff --git a/php-tecnickcom-tc-lib-pdf-page.spec b/php-tecnickcom-tc-lib-pdf-page.spec
index 89771a8..5651b97 100644
--- a/php-tecnickcom-tc-lib-pdf-page.spec
+++ b/php-tecnickcom-tc-lib-pdf-page.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 144fbe78b3a416f1a4a0964f085401cf3e543e63
+%global gh_commit 330343b4cc649891d386e8f900d8a9e4953dead7
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global c_vendor tecnickcom
%global gh_owner tecnickcom
@@ -15,7 +15,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.4.10
+Version: 2.5.0
Release: 1%{?dist}
Summary: PHP library containing PDF page formats and definitions
@@ -26,25 +26,27 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildArch: noarch
%if %{with_tests}
# For tests
-%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
-%global phpunit %{_bindir}/phpunit7
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.5.0
%else
-%global phpunit %{_bindir}/phpunit
+%global phpunit %{_bindir}/phpunit8
+BuildRequires: phpunit8 >= 8.5.13
%endif
-BuildRequires: %{phpunit}
BuildRequires: php(language) >= 5.4
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(%{c_vendor}/tc-lib-color) >= 1.12.13 with php-composer(%{c_vendor}/tc-lib-color) < 2)
-BuildRequires: (php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.5.8 with php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2)
+BuildRequires: (php-composer(%{c_vendor}/tc-lib-color) >= 1.14 with php-composer(%{c_vendor}/tc-lib-color) < 2)
+BuildRequires: (php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.6 with php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2)
%else
-BuildRequires: php-composer(%{c_vendor}/tc-lib-color) < 2
-BuildRequires: php-composer(%{c_vendor}/tc-lib-color) >= 1.12.13
-BuildRequires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2
-BuildRequires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.5.8
+BuildRequires: php-%{c_vendor}-tc-lib-color < 2
+BuildRequires: php-%{c_vendor}-tc-lib-color >= 1.14
+BuildRequires: php-%{c_vendor}-tc-lib-pdf-encrypt < 2
+BuildRequires: php-%{c_vendor}-tc-lib-pdf-encrypt >= 1.6
%endif
BuildRequires: php-date
BuildRequires: php-zlib
%endif
+BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
# "php": ">=5.4"
@@ -56,16 +58,17 @@ Requires: php(language) >= 5.4
Requires: php-date
Requires: php-zlib
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(%{c_vendor}/tc-lib-color) >= 1.12.13 with php-composer(%{c_vendor}/tc-lib-color) < 2)
-Requires: (php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.5.8 with php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2)
+Requires: (php-composer(%{c_vendor}/tc-lib-color) >= 1.14 with php-composer(%{c_vendor}/tc-lib-color) < 2)
+Requires: (php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.6 with php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2)
%else
-Requires: php-composer(%{c_vendor}/tc-lib-color) < 2
-Requires: php-composer(%{c_vendor}/tc-lib-color) >= 1.12.13
-Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2
-Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.5.8
+Requires: php-%{c_vendor}-tc-lib-color < 2
+Requires: php-%{c_vendor}-tc-lib-color >= 1.14
+Requires: php-%{c_vendor}-tc-lib-pdf-encrypt) < 2
+Requires: php-%{c_vendor}-tc-lib-pdf-encrypt) >= 1.6
%endif
# From phpcompatinfo report for version 2.0.1
# None
+Requires: php-composer(fedora/autoloader)
# Composer
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
@@ -87,30 +90,34 @@ grep -q '^%{version}$' VERSION
%build
-# Empty build section, most likely nothing required.
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/Com/Tecnick/Color/autoload.php',
+ '%{_datadir}/php/Com/Tecnick/Pdf/Encrypt/autoload.php',
+]);
+EOF
%install
mkdir -p $(dirname %{buildroot}%{php_project})
cp -pr src %{buildroot}%{php_project}
-cp -p resources/autoload.php \
- %{buildroot}%{php_project}/autoload.php
%check
%if %{with_tests}
mkdir vendor
-cat <<EOF | tee vendor/autoload.php
+cat << 'EOF' | tee vendor/autoload.php
<?php
require '%{buildroot}%{php_project}/autoload.php';
-require '%{php_project}/../../Color/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('Test\\', dirname(__DIR__) . '/test');
EOF
ret=0
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73 php74; do
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit7} --no-coverage --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1
fi
done
exit $ret
@@ -128,6 +135,10 @@ exit $ret
%changelog
+* Mon Dec 21 2020 Remi Collet <remi@remirepo.net> - 2.5.0-1
+- update to 2.5.0
+- switch to classmap autoloader
+
* Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 2.4.10-1
- update to 2.4.10 (no change)