From 9b5f66b1b6ff1e5ee868ab6758788ab887cf4c1e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 7 Jul 2020 15:13:22 +0200 Subject: refresh --- composer.json | 9 ++---- php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch | 50 ++++++++++++++++++++--------- php-bartlett-PHP-CompatInfo.spec | 16 +++++---- 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 21f4b32..3531d70 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,9 @@ "ext-json": "*", "ext-pdo": "*", "ext-pdo_sqlite": "*", - "bartlett/php-reflect": "4.4.x-dev as 4.4.0", + "bartlett/php-reflect": "^4.4", "bartlett/php-compatinfo-db": "^2.0", + "jean85/pretty-package-versions": "^1.5", "psr/log": "^1.0" }, "require-dev": { @@ -53,12 +54,6 @@ "Bartlett\\Tests\\CompatInfo\\": "tests/" } }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/llaville/php-reflect" - } - ], "config": { "optimize-autoloader": true } diff --git a/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch index 74e4a1c..e460999 100644 --- a/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch @@ -1,6 +1,6 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm 2020-07-06 10:54:23.000000000 +0200 -+++ ./bin/phpcompatinfo.json.dist 2020-07-06 15:17:00.620618627 +0200 +--- ./bin/phpcompatinfo.json.dist.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./bin/phpcompatinfo.json.dist 2020-07-07 15:10:25.330090185 +0200 @@ -6,6 +6,19 @@ } ], @@ -22,41 +22,59 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist "analysers" : [ ], diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2020-07-06 15:17:00.620618627 +0200 -+++ ./bin/phpcompatinfo 2020-07-06 15:20:53.977038529 +0200 +--- ./bin/phpcompatinfo.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./bin/phpcompatinfo 2020-07-07 15:10:25.330090185 +0200 @@ -1,23 +1,13 @@ #!/usr/bin/env php setUseIncludePath(true); if (PHP_SAPI !== 'cli') { return; -@@ -28,5 +18,5 @@ use Bartlett\CompatInfo\Console\Applicat +diff -up ./src/Bartlett/CompatInfo/Console/Application.php.rpm ./src/Bartlett/CompatInfo/Console/Application.php +--- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./src/Bartlett/CompatInfo/Console/Application.php 2020-07-07 15:10:37.214047839 +0200 +@@ -16,8 +16,6 @@ namespace Bartlett\CompatInfo\Console; + use Bartlett\CompatInfo\Util\Database; + use Bartlett\Reflect\Console\Application as BaseApplication; + +-use Jean85\PrettyVersions; +- + use OutOfBoundsException; + + /** +@@ -48,12 +46,7 @@ class Application extends BaseApplicatio - Environment::setScanDir(); + public function __construct() + { +- try { +- $version = PrettyVersions::getVersion('bartlett/php-compatinfo')->getPrettyVersion(); +- } catch (OutOfBoundsException $e) { +- $version = self::VERSION; +- } +- parent::__construct(self::NAME, $version); ++ parent::__construct(self::NAME, self::VERSION); + } --$application = new Application($appName, '5.2.3'); -+$application = new Application($appName, '@package_version@'); - $application->run(); + /** diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index e648e01..94c7d3c 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2019 Remi Collet +# Copyright (c) 2011-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -11,13 +11,13 @@ %undefine __brp_mangle_shebangs %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 4c4da0eacb582c15dd6a696eb9123786e3b2de25 +%global gh_commit 2aed4fbbed13290c160f24ca1befc58ddd42cda8 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville %global gh_project php-compat-info #global prever RC2 -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} +%bcond_without tests %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 %global sym_prefix php-symfony3 @@ -38,15 +38,16 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Script for fedora-review Source1: fedora-review-check -# Autoloader for RPM - die composer ! +# RPM autoloader Source2: %{name}-5.1.0-autoload.php # Autoload and sqlite database path +# avoid jean85/pretty-package-versions Patch0: %{name}-5.3.0-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.1.3 -%if %{with_tests} +%if %{with tests} # to run test suite BuildRequires: php-pdo_sqlite # remirepo:1 @@ -80,8 +81,9 @@ BuildRequires: php-composer(fedora/autoloader) # "ext-json": "*", # "ext-pdo": "*", # "ext-pdo_sqlite": "*", -# "bartlett/php-reflect": "4.4.x-dev as 4.4.0", +# "bartlett/php-reflect": "^4.4", # "bartlett/php-compatinfo-db": "^2.0", +# "jean85/pretty-package-versions": "^1.5", # "psr/log": "^1.0" Requires: php(language) >= 7.1.3 Requires: php-cli @@ -155,7 +157,7 @@ install -D -p -m 644 bin/phpcompatinfo.1 %{buildroot}%{_mandir}/man1/php install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/fedora-review-check -%if %{with_tests} +%if %{with tests} %check mkdir vendor ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ -- cgit