summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-08-26 10:36:40 +0200
committerRemi Collet <remi@remirepo.net>2020-08-26 10:36:40 +0200
commit3c76b3eb32dfcea48eb5dfcb2f86d08839dba089 (patch)
tree00b14f7b779ad71c7693d49cf05fc188345845ff
parent3f6ed3c4a0f057a1dc3b903d0a12272ae7a9d71d (diff)
update to 1.8.2
switch to classmap autoloader
-rw-r--r--composer.json2
-rw-r--r--php-jsonlint.spec39
2 files changed, 21 insertions, 20 deletions
diff --git a/composer.json b/composer.json
index a8706ad..b065d7b 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,7 @@
}
],
"require": {
- "php": "^5.3 || ^7.0"
+ "php": "^5.3 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
diff --git a/php-jsonlint.spec b/php-jsonlint.spec
index 44808b4..75a6bbd 100644
--- a/php-jsonlint.spec
+++ b/php-jsonlint.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-jsonlint
#
-# Copyright (c) 2013-2018 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
# Remi Collet <remi@fedoraproject.org>
#
# License: MIT
@@ -13,21 +13,20 @@
%global github_owner Seldaek
%global github_name jsonlint
-%global github_version 1.7.2
-%global github_commit e2e5d290e4d2a4f0eb449f510071392e00e10d19
+%global github_version 1.8.2
+%global github_commit 590cfec960b77fd55e39b7d9246659e95dd6d337
-# "php": "^5.3 || ^7.0"
+# "php": "^5.3 || ^7.0 || ^8.0"
%global php_min_ver 5.3
# Build using "--without tests" to disable tests
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%bcond_without tests
Name: php-%{github_name}
Version: %{github_version}
Release: 1%{?dist}
Summary: JSON Lint for PHP
-Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
@@ -36,7 +35,7 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
Patch0: %{name}-bin-without-composer-autoloader.patch
BuildArch: noarch
-%if %{with_tests}
+%if %{with tests}
# For tests: composer.json
BuildRequires: php(language) >= %{php_min_ver}
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
@@ -46,15 +45,15 @@ BuildRequires: phpunit6
%global phpunit %{_bindir}/phpunit
BuildRequires: php-phpunit-PHPUnit >= 4.8.35
%endif
-# For tests: phpcompatinfo (computed from version 1.6.0)
+# For tests: phpcompatinfo (computed from version 1.8.2)
BuildRequires: php-json
BuildRequires: php-pcre
# For autoloader
-BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-fedora-autoloader-devel
%endif
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.7.0)
+# phpcompatinfo (computed from version 1.8.2)
Requires: php-cli
Requires: php-pcre
# For autoloader
@@ -85,13 +84,10 @@ Autoloader: %{_datadir}/php/Seld/JsonLint/autoload.php
%build
: Generate autoloader
-cat << 'EOF' | tee src/Seld/JsonLint/autoload.php
-<?php
-/* Autoloader for %{name} and its dependencies */
-
-require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('Seld\\JsonLint\\', __DIR__);
-EOF
+phpab \
+ --template fedora \
+ --output src/Seld/JsonLint/autoload.php \
+ src/Seld/JsonLint
%install
@@ -105,10 +101,10 @@ install -pm 0755 bin/jsonlint %{buildroot}%{_bindir}/jsonlint-php
%check
-%if %{with_tests}
+%if %{with tests}
ret=0
-for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73 php74; do
+for cmd in "php %{phpunit}" php72 php73 php74 php80; do
if which $cmd; then
set $cmd
$1 ${2:-%{_bindir}/phpunit6} \
@@ -124,6 +120,7 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *md
@@ -134,6 +131,10 @@ exit $ret
%changelog
+* Wed Aug 26 2020 Remi Collet <remi@remirepo.net> - 1.8.2-1
+- update to 1.8.2
+- switch to classmap autoloader
+
* Fri Oct 25 2019 Remi Collet <remi@remirepo.net> - 1.7.2-1
- update to 1.7.2