diff options
| -rw-r--r-- | composer.json | 10 | ||||
| -rwxr-xr-x | makesrc.sh | 3 | ||||
| -rw-r--r-- | phan-autoload.patch | 30 | ||||
| -rw-r--r-- | phan.spec | 34 | 
4 files changed, 44 insertions, 33 deletions
| diff --git a/composer.json b/composer.json index 7102463..325f794 100644 --- a/composer.json +++ b/composer.json @@ -18,11 +18,11 @@      "config": {          "sort-packages": true,          "platform": { -            "php": "7.0.24" +            "php": "7.1.22"          }      },      "require": { -        "php": "^7.0.0", +        "php": "^7.1.0",          "ext-filter": "*",          "ext-json": "*",          "composer/semver": "^1.4", @@ -34,13 +34,13 @@          "symfony/polyfill-mbstring": "^1.11.0"      },      "suggest": { -        "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is recommended, php-ast ^0.1.5|^1.0.0 is needed.", +        "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed.",          "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",          "ext-tokenizer": "Needed for non-AST support and file/line-based suppressions."      },      "require-dev": { -        "brianium/paratest": "^1.1", -        "phpunit/phpunit": "^6.3.0" +        "brianium/paratest": "^2.2.0", +        "phpunit/phpunit": "^7.5.0"      },      "autoload": {          "psr-4": {"Phan\\": "src/Phan"} @@ -4,6 +4,9 @@ NAME=$(basename $PWD)  OWNER=$(sed   -n '/^%global gh_owner/{s/.* //;p}'   $NAME.spec)  PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)  VERSION=$(sed -n '/^Version:/{s/.* //;p}'           $NAME.spec) +VERSION=$(sed -n '/^%global upstream_version/{s/.* //;p}' $NAME.spec) +PREVER=$(sed -n '/^%global upstream_prever/{s/.* //;p}' $NAME.spec) +VERSION=${VERSION}${PREVER:-}  COMMIT=$(sed  -n '/^%global gh_commit/{s/.* //;p}'  $NAME.spec)  SHORT=${COMMIT:0:7} diff --git a/phan-autoload.patch b/phan-autoload.patch index ca305ed..0698111 100644 --- a/phan-autoload.patch +++ b/phan-autoload.patch @@ -1,9 +1,9 @@  diff -up ./src/Phan/Bootstrap.php.rpm ./src/Phan/Bootstrap.php ---- ./src/Phan/Bootstrap.php.rpm	2019-04-29 09:34:09.000000000 +0200 -+++ ./src/Phan/Bootstrap.php	2019-04-29 09:34:21.823734920 +0200 -@@ -14,21 +14,8 @@ ini_set("memory_limit", '-1'); - define('CLASS_DIR', __DIR__ . '/../'); - set_include_path(get_include_path() . PATH_SEPARATOR . CLASS_DIR); +--- ./src/Phan/Bootstrap.php.rpm	2019-05-14 10:31:18.879987819 +0200 ++++ ./src/Phan/Bootstrap.php	2019-05-14 10:32:33.370482249 +0200 +@@ -42,21 +42,8 @@ if (PHP_VERSION_ID < 70100) { +     exit(1); + }  -// Use the composer autoloader  -$found_autoloader = false; @@ -26,17 +26,17 @@ diff -up ./src/Phan/Bootstrap.php.rpm ./src/Phan/Bootstrap.php   define('EXIT_SUCCESS', 0);   define('EXIT_FAILURE', 1);  diff -up ./src/phan.php.rpm ./src/phan.php ---- ./src/phan.php.rpm	2019-04-29 09:34:09.000000000 +0200 -+++ ./src/phan.php	2019-04-29 09:34:21.824734926 +0200 +--- ./src/phan.php.rpm	2019-05-14 10:27:30.000000000 +0200 ++++ ./src/phan.php	2019-05-14 10:31:18.880987825 +0200  @@ -1,3 +1,4 @@  +#!/usr/bin/env php   <?php declare(strict_types=1);   // Phan does a ton of GC and this offers a major speed  diff -up ./src/Phan/Plugin/ConfigPluginSet.php.rpm ./src/Phan/Plugin/ConfigPluginSet.php ---- ./src/Phan/Plugin/ConfigPluginSet.php.rpm	2019-04-29 09:34:21.824734926 +0200 -+++ ./src/Phan/Plugin/ConfigPluginSet.php	2019-04-29 09:35:40.107198375 +0200 -@@ -760,7 +760,7 @@ final class ConfigPluginSet extends Plug +--- ./src/Phan/Plugin/ConfigPluginSet.php.rpm	2019-05-14 10:31:18.880987825 +0200 ++++ ./src/Phan/Plugin/ConfigPluginSet.php	2019-05-14 10:33:30.750863075 +0200 +@@ -775,7 +775,7 @@ final class ConfigPluginSet extends Plug        */       public static function getBuiltinPluginDirectory() : string       { @@ -44,18 +44,18 @@ diff -up ./src/Phan/Plugin/ConfigPluginSet.php.rpm ./src/Phan/Plugin/ConfigPlugi  +        return \dirname(__DIR__, 2) . '/plugins/';       } -     /** +     private function ensurePluginsExist() : void  diff -up ./src/prep.php.rpm ./src/prep.php ---- ./src/prep.php.rpm	2019-04-29 09:34:09.000000000 +0200 -+++ ./src/prep.php	2019-04-29 09:34:21.824734926 +0200 +--- ./src/prep.php.rpm	2019-05-14 10:27:31.000000000 +0200 ++++ ./src/prep.php	2019-05-14 10:31:18.880987825 +0200  @@ -1,3 +1,4 @@  +#!/usr/bin/env php   <?php declare(strict_types=1);   // Phan does a ton of GC and this offers a major speed  diff -up ./src/requirements.php.rpm ./src/requirements.php ---- ./src/requirements.php.rpm	2019-04-29 09:34:09.000000000 +0200 -+++ ./src/requirements.php	2019-04-29 09:34:21.824734926 +0200 +--- ./src/requirements.php.rpm	2019-05-14 10:27:30.000000000 +0200 ++++ ./src/requirements.php	2019-05-14 10:31:18.880987825 +0200  @@ -8,10 +8,10 @@ if ((int)phpversion()[0] < 7) {       exit(1);   } @@ -10,22 +10,24 @@  # For compatibility with SCL  %undefine __brp_mangle_shebangs -%global gh_commit    73795afa51d3e4302c2306168f3d182ca35d8c89 +%global gh_commit    c1484bcdd41672cbe63a35a31f5ead67d53768a5  %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.0.0 +%global upstream_prever  RC2  Name:           %{gh_project} -Version:        1.3.4 +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}-%{version}-%{?gh_short}.tgz +Source0:        %{name}-%{upstream_version}%{?upstream_prever}-%{?gh_short}.tgz  Source1:        makesrc.sh  # Use fedora autoloader @@ -33,8 +35,8 @@ Patch0:         %{name}-autoload.patch  BuildArch:      noarch  %if %{with_tests} -BuildRequires:  php(language) >= 7.0.0 -BuildRequires:  php-ast >= 0.1.5 +BuildRequires:  php(language) >= 7.1.0 +BuildRequires:  php-ast >= 1.0.1  # remirepo:1  %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8  BuildRequires:  (php-composer(composer/semver) >= 1.4                  with php-composer(composer/semver) < 2) @@ -70,9 +72,9 @@ BuildRequires:  php-spl  BuildRequires:  php-sysvmsg  BuildRequires:  php-sysvsem  # For tests, from composer.json "require-dev": { -#        "brianium/paratest": "^1.1", -#        "phpunit/phpunit": "^6.3.0" -BuildRequires:  phpunit6 >= 6.3.0 +#        "brianium/paratest": "^2.2.0", +#        "phpunit/phpunit": "^7.5.0" +BuildRequires:  phpunit7 >= 7.5  BuildRequires:  php-date  BuildRequires:  php-intl  BuildRequires:  php-soap @@ -81,7 +83,7 @@ BuildRequires:  php-soap  BuildRequires:  php-composer(fedora/autoloader)  # From composer.json, "require": { -#        "php": "^7.0.0", +#        "php": "^7.1.0",  #        "ext-filter": "*",  #        "ext-json": "*",  #        "composer/semver": "^1.4", @@ -91,16 +93,16 @@ BuildRequires:  php-composer(fedora/autoloader)  #        "sabre/event": "^5.0",  #        "symfony/console": "^2.3|^3.0|~4.0",  #        "symfony/polyfill-mbstring": "^1.11.0" -Requires:       php(language) >= 7.0.0 +Requires:       php(language) >= 7.1.0  Requires:       php-filter  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). php-ast ^0.1.5|^1.0.0 is needed.", +#        "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed.",  #        "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",  #        "ext-tokenizer": "Needed for non-AST support and file/line-based suppressions." -Recommends:     php-ast >= 0.1.5 +Recommends:     php-ast >= 1.0.1  Suggests:       php-igbinary  Recommends:     php-tokenizer  Requires:       (php-composer(composer/semver) >= 1.4                  with php-composer(composer/semver) < 2) @@ -209,7 +211,7 @@ require '%{buildroot}%{_datadir}/php/%{psr0}/Phan/Bootstrap.php';  EOF  # NOTICE mosquitto, request and grpc must be disabled -%{_bindir}/phpunit6 -d memory_limit=1G --bootstrap tests/autoload.php --verbose +%{_bindir}/phpunit7 -d memory_limit=1G --bootstrap tests/autoload.php --verbose  %else @@ -227,6 +229,12 @@ EOF  %changelog +* Tue May 14 2019 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 1.3.4-1  - update to 1.3.4 | 
