From 9c1dcef6ea0cd27ca4b3a7e953ee5bdc8135da93 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 Jan 2018 13:52:58 +0100 Subject: Update to 0.10.3 raise dependency on felixfbecker/advanced-json-rpc 3.0 add dependency on microsoft/tolerant-php-parser allow Symfony 4 --- composer.json | 5 +++-- phan.spec | 52 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 6bdfc5f..40449f1 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,11 @@ "require": { "php": "~7.1.0 || ~7.2.0", "ext-ast": "^0.1.5", - "felixfbecker/advanced-json-rpc": "^2.0", + "felixfbecker/advanced-json-rpc": "^3.0", "nikic/PHP-Parser": "~3.1.1", + "microsoft/tolerant-php-parser": "0.0.8", "sabre/event": "^5.0", - "symfony/console": "~2.3|~3.0" + "symfony/console": "^2.3|^3.0|~4.0" }, "require-dev": { "phpunit/phpunit": "^6.3.0" diff --git a/phan.spec b/phan.spec index 657ef8e..c90404c 100644 --- a/phan.spec +++ b/phan.spec @@ -1,12 +1,12 @@ # remirepo/fedora spec file for phan # -# Copyright (c) 2016-2017 Remi Collet +# Copyright (c) 2016-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit 53d9a6163ab7f9de1fd89b48e56bb5df985950aa +%global gh_commit c39ac07622ff18ed13eb4ee0e53087c59f83ed5e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phan #global gh_date 20150820 @@ -15,7 +15,7 @@ %global with_tests 0%{!?_without_tests:1} Name: %{gh_project} -Version: 0.10.2 +Version: 0.10.3 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}.7.1 Summary: A static analyzer for PHP @@ -32,14 +32,24 @@ BuildArch: noarch BuildRequires: php(language) < 7.2 BuildRequires: php(language) >= 7.1 BuildRequires: php-ast >= 0.1.5 -BuildRequires: php-composer(felixfbecker/advanced-json-rpc) < 3 -BuildRequires: php-composer(felixfbecker/advanced-json-rpc) >= 2.0 +%if 0%{?fedora} >= 27 +BuildRequires: (php-composer(felixfbecker/advanced-json-rpc) >= 3.0 with php-composer(felixfbecker/advanced-json-rpc) < 4) +BuildRequires: (php-composer(nikic/php-parser) >= 3.1.1 with php-composer(nikic/php-parser) < 4) +BuildRequires: (php-composer(microsoft/tolerant-php-parser) >= 0.0.8 with php-composer(microsoft/tolerant-php-parser) < 1) +BuildRequires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/event) < 6) +BuildRequires: (php-composer(symfony/console) >= 2.8 with php-composer(symfony/console) < 5) +%else +BuildRequires: php-composer(felixfbecker/advanced-json-rpc) < 4 +BuildRequires: php-composer(felixfbecker/advanced-json-rpc) >= 3.0 BuildRequires: php-composer(nikic/php-parser) < 4 BuildRequires: php-composer(nikic/php-parser) >= 3.1.1 +BuildRequires: php-composer(microsoft/tolerant-php-parser) < 1 +BuildRequires: php-composer(microsoft/tolerant-php-parser) >= 0.0.8 BuildRequires: php-composer(sabre/event) < 6 BuildRequires: php-composer(sabre/event) >= 5.0 -BuildRequires: php-composer(symfony/console) < 4 +BuildRequires: php-composer(symfony/console) < 5 BuildRequires: php-composer(symfony/console) >= 2.8 +%endif BuildRequires: php-reflection BuildRequires: php-dom BuildRequires: php-filter @@ -69,14 +79,24 @@ BuildRequires: php-composer(fedora/autoloader) # "symfony/console": "~2.3|~3.0" Requires: php(language) >= 7.1 Requires: php-ast >= 0.1.5 -Requires: php-composer(felixfbecker/advanced-json-rpc) < 3 -Requires: php-composer(felixfbecker/advanced-json-rpc) >= 2.0 +%if 0%{?fedora} >= 27 +Requires: (php-composer(felixfbecker/advanced-json-rpc) >= 3.0 with php-composer(felixfbecker/advanced-json-rpc) < 4) +Requires: (php-composer(nikic/php-parser) >= 3.1.1 with php-composer(nikic/php-parser) < 4) +Requires: (php-composer(microsoft/tolerant-php-parser) >= 0.0.8 with php-composer(microsoft/tolerant-php-parser) < 1) +Requires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/event) < 6) +Requires: (php-composer(symfony/console) >= 2.8 with php-composer(symfony/console) < 5) +%else +Requires: php-composer(felixfbecker/advanced-json-rpc) < 4 +Requires: php-composer(felixfbecker/advanced-json-rpc) >= 3.0 Requires: php-composer(nikic/php-parser) < 4 Requires: php-composer(nikic/php-parser) >= 3.1.1 +Requires: php-composer(microsoft/tolerant-php-parser) < 1 +Requires: php-composer(microsoft/tolerant-php-parser) >= 0.0.8 Requires: php-composer(sabre/event) < 6 Requires: php-composer(sabre/event) >= 5.0 -Requires: php-composer(symfony/console) < 4 +Requires: php-composer(symfony/console) < 5 Requires: php-composer(symfony/console) >= 2.3 +%endif # From phpcompatinfo report for 0.8.0 Requires: php-cli Requires: php-dom @@ -117,10 +137,12 @@ cat << 'EOF' | tee src/autoload.php require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Phan\\', __DIR__ . '/Phan'); \Fedora\Autoloader\Dependencies::required([ - '%{_datadir}/php/AdvancedJsonRpc/autoload.php', + '%{_datadir}/php/AdvancedJsonRpc3/autoload.php', '%{_datadir}/php/PhpParser3/autoload.php', + '%{_datadir}/php/Microsoft/PhpParser/autoload.php', '%{_datadir}/php/Sabre/Event5/autoload.php', [ + '%{_datadir}/php/Symfony4/Component/Console/autoload.php', '%{_datadir}/php/Symfony3/Component/Console/autoload.php', '%{_datadir}/php/Symfony/Component/Console/autoload.php', ], @@ -163,12 +185,8 @@ EOF %endif -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json @@ -178,6 +196,12 @@ rm -rf %{buildroot} %changelog +* Mon Jan 22 2018 Remi Collet - 0.10.3-1 +- Update to 0.10.3 +- raise dependency on felixfbecker/advanced-json-rpc 3.0 +- add dependency on microsoft/tolerant-php-parser +- allow Symfony 4 + * Sat Nov 18 2017 Remi Collet - 0.10.2-1 - Update to 0.10.2 -- cgit