# remirepo/fedora spec file for phan # # Copyright (c) 2016-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # For compatibility with SCL %undefine __brp_mangle_shebangs %global gh_commit c1694f08654e0cd534d1ecda10f242c77a44f235 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phan #global gh_date 20150820 %global gh_project phan %global psr0 Phan %global with_tests 0%{!?_without_tests:1} %global upstream_version 2.7.0 #global upstream_prever RC2 Name: %{gh_project} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: A static analyzer for PHP License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{upstream_version}%{?upstream_prever}-%{?gh_short}.tgz Source1: makesrc.sh # Use fedora autoloader Patch0: %{name}-autoload.patch BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 7.2 BuildRequires: php-ast >= 1.0.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2) BuildRequires: (php-composer(composer/xdebug-handler) >= 1.3.2 with php-composer(composer/xdebug-handler) < 2) BuildRequires: (php-composer(felixfbecker/advanced-json-rpc) >= 3.0.4 with php-composer(felixfbecker/advanced-json-rpc) < 4) BuildRequires: (php-composer(microsoft/tolerant-php-parser) >= 0.0.20 with php-composer(microsoft/tolerant-php-parser) < 0.1) BuildRequires: (php-composer(netresearch/jsonmapper) >= 1.6 with php-composer(netresearch/jsonmapper) < 3) 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) < 6) # remirepo:15 %else BuildRequires: php-composer(composer/semver) < 2 BuildRequires: php-composer(composer/semver) >= 1.4 BuildRequires: php-composer(composer/xdebug-handler) < 2 BuildRequires: php-composer(composer/xdebug-handler) >= 1.3.2 BuildRequires: php-composer(felixfbecker/advanced-json-rpc) < 4 BuildRequires: php-composer(felixfbecker/advanced-json-rpc) >= 3.0.4 BuildRequires: php-composer(microsoft/tolerant-php-parser) < 0.1 BuildRequires: php-composer(microsoft/tolerant-php-parser) >= 0.0.18 BuildRequires: php-composer(netresearch/jsonmapper) < 3 BuildRequires: php-composer(netresearch/jsonmapper) >= 1.6 BuildRequires: php-composer(sabre/event) < 6 BuildRequires: php-composer(sabre/event) >= 5.0 BuildRequires: php-composer(symfony/console) < 4 %endif BuildRequires: php-reflection BuildRequires: php-ctype BuildRequires: php-dom BuildRequires: php-filter BuildRequires: php-json BuildRequires: php-mbstring BuildRequires: php-pcntl BuildRequires: php-pcre BuildRequires: php-posix BuildRequires: php-spl BuildRequires: php-sysvmsg BuildRequires: php-sysvsem # For tests, from composer.json "require-dev": { # "brianium/paratest": "^4.0.0", # "phpunit/phpunit": "^7.5.0" BuildRequires: phpunit7 >= 7.5 BuildRequires: php-date BuildRequires: php-intl BuildRequires: php-soap %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": "^7.1.0", # "ext-filter": "*", # "ext-json": "*", # "ext-tokenizer": "*", # "composer/semver": "^1.4", # "composer/xdebug-handler": "^1.3.2", # "felixfbecker/advanced-json-rpc": "^3.0.4", # "microsoft/tolerant-php-parser": "0.0.20", # "netresearch/jsonmapper": "^1.6.0|^2.0", # "sabre/event": "^5.0", # "symfony/console": "^2.3|^3.0|~4.0|^5.0", # "symfony/polyfill-mbstring": "^1.11.0", # "symfony/polyfill-php72": "^1.15" Requires: php(language) >= 7.2 Requires: php-filter Requires: php-tokenizer Requires: php-json # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 # From composer.json, "suggest": { # "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed.", # "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", # "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", # "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", # "ext-tokenizer": "Needed for non-AST support and file/line-based suppressions." Recommends: php-ast >= 1.0.6 Suggests: php-igbinary Suggests: php-iconv Requires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2) Requires: (php-composer(composer/xdebug-handler) >= 1.3.2 with php-composer(composer/xdebug-handler) < 2) Requires: (php-composer(felixfbecker/advanced-json-rpc) >= 3.0.4 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.20 with php-composer(microsoft/tolerant-php-parser) < 0.1) Requires: (php-composer(netresearch/jsonmapper) >= 1.6 with php-composer(netresearch/jsonmapper) < 3) 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) < 6) # remirepo:16 %else Requires: php-ast >= 0.1.5 Requires: php-composer(composer/semver) < 2 Requires: php-composer(composer/semver) >= 1.4 Requires: php-composer(composer/xdebug-handler) < 2 Requires: php-composer(composer/xdebug-handler) >= 1.3.2 Requires: php-composer(felixfbecker/advanced-json-rpc) < 4 Requires: php-composer(felixfbecker/advanced-json-rpc) >= 3.0.4 Requires: php-composer(microsoft/tolerant-php-parser) < 0.1 Requires: php-composer(microsoft/tolerant-php-parser) >= 0.0.18 Requires: php-composer(netresearch/jsonmapper) < 3 Requires: php-composer(netresearch/jsonmapper) >= 1.6 Requires: php-composer(sabre/event) < 6 Requires: php-composer(sabre/event) >= 5.0 Requires: php-composer(symfony/console) < 4 %endif # From phpcompatinfo report for 2.3.0 Requires: php-cli Requires: php-reflection Requires: php-ctype Requires: php-dom Requires: php-mbstring Requires: php-pcntl Requires: php-pcre Requires: php-posix Requires: php-readline Requires: php-spl Requires: php-sysvmsg Requires: php-sysvsem # For autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(etsy/%{gh_project}) = %{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} %description Phan is a static analyzer that looks for common issues and will verify type compatibility on various operations when type information is available or can be deduced. Phan does not make any serious attempt to understand flow control and narrow types based on conditionals. %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm cat << 'EOF' | tee src/autoload.php - 2.7.0-1 - update to 2.7.0 - raise dependency on PHP 7.2 * Sat Mar 14 2020 Remi Collet - 2.6.1-1 - update to 2.6.1 - allow netresearch/jsonmapper 2.0 * Mon Mar 9 2020 Remi Collet - 2.6.0-1 - update to 2.6.0 - raise dependency on microsoft/tolerant-php-parser 0.0.20 - raise dependency on ast 1.0.6 * Thu Feb 20 2020 Remi Collet - 2.5.0-1 - update to 2.5.0 * Fri Feb 14 2020 Remi Collet - 2.4.9-1 - update to 2.4.9 * Mon Jan 27 2020 Remi Collet - 2.4.8-1 - update to 2.4.8 * Thu Jan 23 2020 Remi Collet - 2.4.7-1 - update to 2.4.7 * Thu Jan 2 2020 Remi Collet - 2.4.6-1 - update to 2.4.6 * Wed Dec 11 2019 Remi Collet - 2.4.5-1 - update to 2.4.5 - allow Symfony 5 * Mon Nov 25 2019 Remi Collet - 2.4.4-1 - update to 2.4.4 * Thu Nov 21 2019 Remi Collet - 2.4.3-1 - update to 2.4.3 - add explicit dependency on netresearch/jsonmapper * Tue Nov 12 2019 Remi Collet - 2.4.2-1 - update to 2.4.2 * Mon Nov 4 2019 Remi Collet - 2.4.1-1 - update to 2.4.1 * Mon Oct 28 2019 Remi Collet - 2.4.0-1 - update to 2.4.0 * Mon Oct 21 2019 Remi Collet - 2.3.1-1 - update to 2.3.1 * Mon Oct 14 2019 Remi Collet - 2.3.0-1 - update to 2.3.0 * Fri Oct 4 2019 Remi Collet - 2.2.13-1 - update to 2.2.13 - raise dependency on felixfbecker/advanced-json-rpc 3.0.4 * Mon Sep 9 2019 Remi Collet - 2.2.12-1 - update to 2.2.12 * Mon Aug 19 2019 Remi Collet - 2.2.11-1 - update to 2.2.11 * Mon Aug 12 2019 Remi Collet - 2.2.9-1 - update to 2.2.9 * Thu Aug 1 2019 Remi Collet - 2.2.8-1 - update to 2.2.8 * Thu Jul 18 2019 Remi Collet - 2.2.6-1 - update to 2.2.6 * Mon Jul 15 2019 Remi Collet - 2.2.5-1 - update to 2.2.5 * Tue Jul 2 2019 Remi Collet - 2.2.4-1 - update to 2.2.4 - raise dependency on microsoft/tolerant-php-parser 0.0.18 * Tue Jun 18 2019 Remi Collet - 2.2.3-1 - update to 2.2.3 * Mon Jun 17 2019 Remi Collet - 2.2.2-1 - update to 2.2.2 * Mon Jun 17 2019 Remi Collet - 2.2.1-1 - update to 2.2.1 * Sat Jun 15 2019 Remi Collet - 2.2.0-1 - update to 2.2.0 * Sun Jun 2 2019 Remi Collet - 2.1.0-1 - update to 2.1.0 * Mon May 20 2019 Remi Collet - 2.0.0-1 - update to 2.0.0 * Tue May 14 2019 Remi Collet - 2.0.0~RC2-1 - update to 2.0.0RC2 - raise dependency on PHP 7.1.0 - raise dependency on ast 1.0.1 - switch to phpunit7 * Fri May 10 2019 Remi Collet - 1.3.4-1 - update to 1.3.4 * Thu May 9 2019 Remi Collet - 1.3.3-1 - update to 1.3.3 * Mon Apr 29 2019 Remi Collet - 1.3.2-1 - update to 1.3.2 * Tue Apr 23 2019 Remi Collet - 1.3.1-1 - update to 1.3.1 * Mon Apr 8 2019 Remi Collet - 1.2.8-1 - update to 1.2.8 * Sat Mar 23 2019 Remi Collet - 1.2.7-1 - update to 1.2.7 - raise dependency on microsoft/tolerant-php-parser 0.0.17 * Sun Mar 10 2019 Remi Collet - 1.2.6-1 - update to 1.2.6 * Wed Feb 27 2019 Remi Collet - 1.2.5-1 - update to 1.2.5 - add dependecy on mbstring - add weak dependecy on igbinary * Tue Feb 19 2019 Remi Collet - 1.2.4-1 - update to 1.2.4 - raise dependency on composer/xdebug-handler 1.3.2 * Mon Feb 11 2019 Remi Collet - 1.2.3-1 - update to 1.2.3 * Mon Feb 4 2019 Remi Collet - 1.2.2-1 - update to 1.2.2 * Sat Jan 19 2019 Remi Collet - 1.2.1-1 - update to 1.2.1 - raise dependency on microsoft/tolerant-php-parser 0.0.16 * Sun Jan 6 2019 Remi Collet - 1.2.0-1 - update to 1.2.0 * Mon Dec 31 2018 Remi Collet - 1.1.10-1 - update to 1.1.10 * Fri Dec 28 2018 Remi Collet - 1.1.9-1 - update to 1.1.9 * Sun Dec 16 2018 Remi Collet - 1.1.8-1 - update to 1.1.8 * Sun Dec 9 2018 Remi Collet - 1.1.7-1 - update to 1.1.7 * Fri Nov 30 2018 Remi Collet - 1.1.5-1 - update to 1.1.5 * Wed Nov 28 2018 Remi Collet - 1.1.4-1 - update to 1.1.4 * Wed Nov 21 2018 Remi Collet - 1.1.3-1 - update to 1.1.3 * Tue Nov 6 2018 Remi Collet - 1.1.2-1 - update to 1.1.2 * Tue Oct 23 2018 Remi Collet - 1.1.1-1 - update to 1.1.1 * Tue Oct 9 2018 Remi Collet - 1.1.0-1 - update to 1.1.0 * Wed Oct 3 2018 Remi Collet - 1.0.7-1 - update to 1.0.7 - raise dependency on microsoft/tolerant-php-parser 0.0.15 - php-ast is optional * Wed Sep 26 2018 Remi Collet - 1.0.6-1 - update to 1.0.6 - sources from git snapshot * Sat Sep 22 2018 Remi Collet - 1.0.5-1 - update to 1.0.5 - open https://github.com/phan/phan/issues/1986 keep the tests - keep ast mandatory despite it is now optional * Mon Sep 10 2018 Remi Collet - 1.0.4-1 - update to 1.0.4 - add the upstream plugins - raise dependency on felixfbecker/advanced-json-rpc 3.0.3 * Sat Sep 8 2018 Remi Collet - 1.0.3-1 - update to 1.0.3 * Fri Sep 7 2018 Remi Collet - 1.0.2-1 - update to 1.0.2 - raise dependency on composer/xdebug-handler 1.3 * Mon Aug 27 2018 Remi Collet - 1.0.1-1 - update to 1.0.1 - raise dependency on microsoft/tolerant-php-parser 0.0.13 * Tue Aug 14 2018 Remi Collet - 1.0.0-1 - update to 1.0.0 * Mon Jul 23 2018 Remi Collet - 0.12.15-1 - update to 0.12.15 * Mon Jul 9 2018 Remi Collet - 0.12.14-1 - update to 0.12.14 * Tue Jun 19 2018 Remi Collet - 0.12.13-1 - update to 0.12.13 - raise dependency on microsoft/tolerant-php-parser 0.0.11 - raise dependency on composer/xdebug-handler 1.1 * Mon Jun 11 2018 Remi Collet - 0.12.12-1 - update to 0.12.12 * Thu May 31 2018 Remi Collet - 0.12.11-1 - update to 0.12.11 * Mon May 28 2018 Remi Collet - 0.12.10-1 - update to 0.12.10 * Wed May 23 2018 Remi Collet - 0.12.9-1 - update to 0.12.9 - raise dependency on microsoft/tolerant-php-parser 0.0.11 * Sun May 13 2018 Remi Collet - 0.12.8-1 - update to 0.12.8 * Tue Apr 3 2018 Remi Collet - 0.12.5-1 - update to 0.12.5 * Mon Apr 2 2018 Remi Collet - 0.12.4-1 - update to 0.12.4 * Mon Mar 26 2018 Remi Collet - 0.12.3-1 - update to 0.12.3 - add dependency on composer/xdebug-handler - raise dependency on microsoft/tolerant-php-parser 0.0.10 * Sat Mar 3 2018 Remi Collet - 0.12.2-1 - Update to 0.12.2 * Thu Mar 1 2018 Remi Collet - 0.12.1-1 - Update to 0.12.1 * Mon Feb 26 2018 Remi Collet - 0.12.0-1 - Update to 0.12.0 - drop dependency on nikic/PHP-Parser - add dependency on composer/semver - same version for PHP 7.0, 7.1 and 7.2 * Thu Feb 15 2018 Remi Collet - 0.11.3-1 - Update to 0.11.3 - raise dependency on microsoft/tolerant-php-parser 0.0.9 * Mon Feb 12 2018 Remi Collet - 0.11.2-1 - Update to 0.11.2 * Mon Jan 22 2018 Remi Collet - 0.11.1-1 - Update to 0.11.1 - 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.11.0-1 - Update to 0.11.0 - raise dependency on PHP 7.2 * Sat Nov 18 2017 Remi Collet - 0.10.2-1 - Update to 0.10.2 * Sat Oct 21 2017 Remi Collet - 0.10.1-1 - Update to 0.10.1 - add dependency on felixfbecker/advanced-json-rpc 2.0 - add dependency on sabre/event 5.0 * Mon Sep 25 2017 Remi Collet - 0.10.0-1 - Update to 0.10.0 - raise dependency on ast 0.1.5 - add dependency on nikic/php-parser 3.1.1 - move from etsy/phan to phan/phan * Wed Aug 16 2017 Remi Collet - 0.9.4-1 - Update to 0.9.4 * Wed Jul 12 2017 Remi Collet - 0.9.3-1 - Update to 0.9.3 - installation layout match upstream tree - remove phan-prep command (only an example) - add phan-client command * Wed Jun 14 2017 Remi Collet - 0.9.2-1 - Update to 0.9.2 - allow Symfony 3 - use phpunit 6 * Thu Mar 16 2017 Remi Collet - 0.9.1-1 - Update to 0.9.1 - raise dependency on PHP 7.1 - raise dependency on ast 0.1.4 * Fri Jan 27 2017 Remi Collet - 0.8.3-1 - update to 0.8.3 * Thu Jan 26 2017 Remi Collet - 0.8.2-1 - update to 0.8.2 * Wed Jan 25 2017 Remi Collet - 0.8.0-1 - update to 0.8.0 * Fri Dec 9 2016 Remi Collet - 0.7-1 - update to 0.7 * Thu Nov 24 2016 Remi Collet - 0.6-1 - initial package