From f76d770fbfe8829cb97ad491acd80f994be0f480 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 May 2019 10:43:16 +0200 Subject: - update to 2.0.0RC2 - raise dependency on PHP 7.1.0 - raise dependency on ast 1.0.1 - switch to phpunit7 --- composer.json | 10 +++++----- makesrc.sh | 3 +++ phan-autoload.patch | 30 +++++++++++++++--------------- 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"} diff --git a/makesrc.sh b/makesrc.sh index 37cb6a2..634cdcc 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -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 = 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 - 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 -- cgit