summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--composer.json10
-rw-r--r--phan-autoload.patch27
-rw-r--r--phan-autoload.php9
-rw-r--r--phan.spec56
5 files changed, 61 insertions, 48 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 7c11a43..121534d 100644
--- a/composer.json
+++ b/composer.json
@@ -16,14 +16,12 @@
"sort-packages": true
},
"require": {
- "php": "~7.0.0",
- "ext-ast": "*",
+ "php": "~7.0.0 || ~7.1.0",
+ "ext-ast": "^0.1.4",
"symfony/console": "~2.3|~3.0"
},
"require-dev": {
- "phpdocumentor/phpdocumentor": "^2.9.0",
- "phpunit/phpunit": "^5.7.2",
- "squizlabs/php_codesniffer": "^2.7.1"
+ "phpunit/phpunit": "^6.2.1"
},
"autoload": {
"psr-4": {"Phan\\": "src/Phan"}
@@ -31,5 +29,5 @@
"autoload-dev": {
"psr-4": {"Phan\\Tests\\": "tests/Phan"}
},
- "bin": ["phan", "tocheckstyle"]
+ "bin": ["phan", "phan_client", "tocheckstyle"]
}
diff --git a/phan-autoload.patch b/phan-autoload.patch
index 4eb8753..c9cd218 100644
--- a/phan-autoload.patch
+++ b/phan-autoload.patch
@@ -1,7 +1,7 @@
diff -up ./src/codebase.php.rpm ./src/codebase.php
---- ./src/codebase.php.rpm 2016-11-24 16:15:15.615092571 +0100
-+++ ./src/codebase.php 2016-11-24 16:15:23.848136345 +0100
-@@ -7,14 +7,8 @@ $internal_trait_name_list = get_declared
+--- ./src/codebase.php.rpm 2017-06-13 17:53:57.000000000 +0200
++++ ./src/codebase.php 2017-06-14 06:15:48.238648972 +0200
+@@ -11,14 +11,8 @@ $internal_const_name_list = array_keys(a
$internal_function_name_list = get_defined_functions()['internal'];
@@ -19,9 +19,9 @@ diff -up ./src/codebase.php.rpm ./src/codebase.php
use Phan\CodeBase;
diff -up ./src/Phan/Bootstrap.php.rpm ./src/Phan/Bootstrap.php
---- ./src/Phan/Bootstrap.php.rpm 2016-11-24 16:12:00.366054438 +0100
-+++ ./src/Phan/Bootstrap.php 2016-11-24 16:16:28.316479122 +0100
-@@ -11,16 +11,8 @@ ini_set("memory_limit", '-1');
+--- ./src/Phan/Bootstrap.php.rpm 2017-06-13 17:53:57.000000000 +0200
++++ ./src/Phan/Bootstrap.php 2017-06-14 06:15:48.238648972 +0200
+@@ -10,16 +10,8 @@ ini_set("memory_limit", '-1');
define('CLASS_DIR', __DIR__ . '/../');
set_include_path(get_include_path().PATH_SEPARATOR.CLASS_DIR);
@@ -41,8 +41,8 @@ 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 2016-11-24 16:08:41.223995606 +0100
-+++ ./src/phan.php 2016-11-24 16:11:41.311953128 +0100
+--- ./src/phan.php.rpm 2017-06-13 17:53:57.000000000 +0200
++++ ./src/phan.php 2017-06-14 06:15:48.238648972 +0200
@@ -1,3 +1,4 @@
+#!/usr/bin/env php
<?php declare(strict_types=1);
@@ -58,8 +58,8 @@ diff -up ./src/phan.php.rpm ./src/phan.php
use Phan\CLI;
use Phan\CodeBase;
diff -up ./src/prep.php.rpm ./src/prep.php
---- ./src/prep.php.rpm 2016-11-24 16:08:59.122090771 +0100
-+++ ./src/prep.php 2016-11-24 16:11:34.003914271 +0100
+--- ./src/prep.php.rpm 2017-06-13 17:53:57.000000000 +0200
++++ ./src/prep.php 2017-06-14 06:15:48.238648972 +0200
@@ -1,3 +1,4 @@
+#!/usr/bin/env php
<?php declare(strict_types=1);
@@ -75,9 +75,9 @@ diff -up ./src/prep.php.rpm ./src/prep.php
use Phan\CLI;
use Phan\Prep;
diff -up ./src/requirements.php.rpm ./src/requirements.php
---- ./src/requirements.php.rpm 2016-11-24 16:15:45.623252123 +0100
-+++ ./src/requirements.php 2016-11-24 16:16:13.253399032 +0100
-@@ -11,7 +11,7 @@ assert(
+--- ./src/requirements.php.rpm 2017-06-14 06:15:48.239648977 +0200
++++ ./src/requirements.php 2017-06-14 06:16:26.179834206 +0200
+@@ -11,6 +11,6 @@ assert(
);
assert(
@@ -85,4 +85,3 @@ diff -up ./src/requirements.php.rpm ./src/requirements.php
+ file_exists(__DIR__ . '/autoload.php'),
'Autoloader not found. Make sure you run `composer install` before running Phan. See https://github.com/etsy/phan#getting-it-running for more details.'
);
-
diff --git a/phan-autoload.php b/phan-autoload.php
index 323e5b1..b40a5bf 100644
--- a/phan-autoload.php
+++ b/phan-autoload.php
@@ -4,6 +4,9 @@
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Phan\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
- '/usr/share/php/Symfony/Component/Console/autoload.php',
-));
+\Fedora\Autoloader\Dependencies::required([
+ [
+ '/usr/share/php/Symfony3/Component/Console/autoload.php',
+ '/usr/share/php/Symfony/Component/Console/autoload.php',
+ ],
+]);
diff --git a/phan.spec b/phan.spec
index f5979a2..67dea5c 100644
--- a/phan.spec
+++ b/phan.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 5f12a3cfbae585618f5b02992c8810c7679457d0
+%global gh_commit 9dbe813f09122c7799e1c197c5a70d3c279867a2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner etsy
#global gh_date 20150820
@@ -15,7 +15,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: %{gh_project}
-Version: 0.8.3
+Version: 0.8.4
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: A static analyzer for PHP
@@ -32,33 +32,43 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 7.0
BuildRequires: php-ast
+BuildRequires: php-composer(symfony/console) < 4
BuildRequires: php-composer(symfony/console) >= 2.8
BuildRequires: php-reflection
+BuildRequires: php-dom
+BuildRequires: php-filter
+BuildRequires: php-json
BuildRequires: php-pcntl
BuildRequires: php-pcre
BuildRequires: php-posix
BuildRequires: php-spl
BuildRequires: php-sysvmsg
BuildRequires: php-sysvsem
+# for some tests
+BuildRequires: php-date
+BuildRequires: php-intl
+BuildRequires: php-soap
# For tests, from composer.json "require-dev": {
-# "phpdocumentor/phpdocumentor": "^2.9.0",
-# "phpunit/phpunit": "^5.7.2",
-# "squizlabs/php_codesniffer": "^2.7.1"
-BuildRequires: php-composer(phpunit/phpunit) >= 5.7.2
+# "phpunit/phpunit": "^6.2.1",
+BuildRequires: phpunit6 >= 6.2.1
%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
-# "php": "~7.0.0",
-# "ext-ast": "*",
+# "php": "~7.0.0 || ~7.1.0",
+# "ext-ast": "^0.1.4",
# "symfony/console": "~2.3|~3.0"
Requires: php(language) >= 7.0
Requires: php-ast
+Requires: php-composer(symfony/console) < 4
Requires: php-composer(symfony/console) >= 2.3
-# From phpcompatinfo report for 0.8.0
+# From phpcompatinfo report for 0.8.4
Requires: php-cli
Requires: php-reflection
+Requires: php-dom
+Requires: php-filter
+Requires: php-json
Requires: php-pcntl
Requires: php-pcre
Requires: php-posix
@@ -83,9 +93,11 @@ and narrow types based on conditionals.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
+%patch0 -p1 -b .rpm
cp %{SOURCE1} src/%{psr0}/autoload.php
+find . -name \*.rpm -delete
+
%build
: Nothing to build
@@ -115,16 +127,8 @@ require '%{buildroot}%{_datadir}/php/%{psr0}/Bootstrap.php';
\Fedora\Autoloader\Autoload::addPsr4('Phan\\Tests\\', __DIR__ . '/Phan');
EOF
-# remirepo:6
-run=0
-ret=0
-if which php71; then
- php71 %{_bindir}/phpunit -d memory_limit=1G --bootstrap tests/autoload.php
- run=1
-fi
-%{_bindir}/phpunit -d memory_limit=1G --bootstrap tests/autoload.php --verbose
-# remirepo:1
-exit $ret
+# Notice request and grpc must be disabled
+%{_bindir}/phpunit6 -d memory_limit=1G --bootstrap tests/autoload.php --verbose
%else
@@ -132,12 +136,7 @@ exit $ret
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
@@ -147,6 +146,13 @@ rm -rf %{buildroot}
%changelog
+* Wed Jun 14 2017 Remi Collet <remi@remirepo.net> - 0.8.4-1
+- Update to 0.8.4
+- allow Symfony 3
+- open https://github.com/etsy/phan/issues/888 issue with request ext.
+- open https://github.com/etsy/phan/issues/889 issue with grpc ext.
+- open https://github.com/nikic/php-ast/issues/59 segfault with mysql_xdevapi
+
* Fri Jan 27 2017 Remi Collet <remi@remirepo.net> - 0.8.3-1
- update to 0.8.3