summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-25 09:54:23 +0200
committerRemi Collet <remi@remirepo.net>2017-09-25 09:54:23 +0200
commit786d5e900d5e7c2d24e7831dc6ed37ad70229889 (patch)
treec54948904c80c6d7bc3ebf6483c92571818fe7a4
parent9e5aa5907c426a66e30ffbd33534f33e7a485f61 (diff)
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
-rw-r--r--.gitignore1
-rw-r--r--composer.json12
-rw-r--r--phan-autoload.patch25
-rw-r--r--phan.spec33
4 files changed, 45 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..fc9aa8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+clog
package-*.xml
*.tgz
*.tar.gz
diff --git a/composer.json b/composer.json
index 47a7581..ec5ab06 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,14 @@
{
- "name": "etsy/phan",
+ "name": "phan/phan",
"description": "A static analyzer for PHP",
"keywords": ["php", "static", "analyzer"],
"type": "project",
"license": "MIT",
"authors": [
{
+ "name": "Tyson Andre"
+ },
+ {
"name": "Rasmus Lerdorf"
},
{
@@ -16,12 +19,13 @@
"sort-packages": true
},
"require": {
- "php": "~7.1.0",
- "ext-ast": "^0.1.4",
+ "php": "~7.1.0 || ~7.2.0",
+ "ext-ast": "^0.1.5",
+ "nikic/PHP-Parser": "~3.1.1",
"symfony/console": "~2.3|~3.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.2.1"
+ "phpunit/phpunit": "^6.3.0"
},
"autoload": {
"psr-4": {"Phan\\": "src/Phan"}
diff --git a/phan-autoload.patch b/phan-autoload.patch
index c484c8b..e748d7c 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-09-24 21:13:44.000000000 +0200
++++ ./src/codebase.php 2017-09-25 09:44:35.834811157 +0200
+@@ -11,14 +11,8 @@ $internal_const_name_list = array_keys(a
$internal_function_name_list = get_defined_functions()['internal'];
@@ -19,8 +19,8 @@ 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
+--- ./src/Phan/Bootstrap.php.rpm 2017-09-24 21:13:44.000000000 +0200
++++ ./src/Phan/Bootstrap.php 2017-09-25 09:44:35.834811157 +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,29 +41,30 @@ 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-09-24 21:13:44.000000000 +0200
++++ ./src/phan.php 2017-09-25 09:44:35.834811157 +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/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-09-24 21:13:44.000000000 +0200
++++ ./src/prep.php 2017-09-25 09:44:35.834811157 +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 2017-03-16 11:48:32.604583610 +0100
-+++ ./src/requirements.php 2017-03-16 11:48:37.237605505 +0100
+--- ./src/requirements.php.rpm 2017-09-25 09:44:35.834811157 +0200
++++ ./src/requirements.php 2017-09-25 09:45:26.546127491 +0200
@@ -11,6 +11,6 @@ assert(
);
assert(
- file_exists(__DIR__ . '/../vendor/autoload.php') || file_exists(__DIR__ . '/../../../autoload.php'),
+- 'Autoloader not found. Make sure you run `composer install` before running Phan. See https://github.com/phan/phan#getting-it-running for more details.'
+ 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.'
++ 'Autoloader not found.'
);
diff --git a/phan.spec b/phan.spec
index 8f51d8a..62686a0 100644
--- a/phan.spec
+++ b/phan.spec
@@ -6,16 +6,16 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit d2f3fbd719cb9236f1d85fb6018f9c8b7e41ffaa
+%global gh_commit f54b4cd4206f68ed53bbc95910351fba8b6c9ada
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner etsy
+%global gh_owner phan
#global gh_date 20150820
%global gh_project phan
%global psr0 Phan
%global with_tests 0%{!?_without_tests:1}
Name: %{gh_project}
-Version: 0.9.4
+Version: 0.10.0
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: A static analyzer for PHP
@@ -31,6 +31,8 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 7.1
BuildRequires: php-ast >= 0.1.4
+BuildRequires: php-composer(nikic/php-parser) < 4
+BuildRequires: php-composer(nikic/php-parser) >= 3.1.1
BuildRequires: php-composer(symfony/console) < 4
BuildRequires: php-composer(symfony/console) >= 2.8
BuildRequires: php-reflection
@@ -44,8 +46,8 @@ BuildRequires: php-spl
BuildRequires: php-sysvmsg
BuildRequires: php-sysvsem
# For tests, from composer.json "require-dev": {
-# "phpunit/phpunit": "^6.2.1"
-BuildRequires: phpunit6 >= 6.2.1
+# "phpunit/phpunit": "^6.3.0"
+BuildRequires: phpunit6 >= 6.3.0
BuildRequires: php-date
BuildRequires: php-intl
BuildRequires: php-soap
@@ -54,11 +56,14 @@ BuildRequires: php-soap
BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
-# "php": "~7.1.0",
-# "ext-ast": "^0.1.4",
+# "php": "~7.1.0 || ~7.2.0",
+# "ext-ast": "^0.1.5",
+# "nikic/PHP-Parser": "~3.1.1",
# "symfony/console": "~2.3|~3.0"
Requires: php(language) >= 7.1
Requires: php-ast >= 0.1.4
+Requires: php-composer(nikic/php-parser) < 4
+Requires: php-composer(nikic/php-parser) >= 3.1.1
Requires: php-composer(symfony/console) < 4
Requires: php-composer(symfony/console) >= 2.3
# From phpcompatinfo report for 0.8.0
@@ -78,6 +83,7 @@ Requires: php-sysvsem
Requires: php-composer(fedora/autoloader)
# Composer
+Provides: php-composer(etsy/%{gh_project}) = %{version}
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
@@ -97,12 +103,13 @@ cat << 'EOF' | tee src/autoload.php
<?php
/* Autoloader for etsy/phan and its dependencies */
-require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Phan\\', __DIR__ . '/Phan');
\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/PhpParser3/autoload.php',
[
- '/usr/share/php/Symfony3/Component/Console/autoload.php',
- '/usr/share/php/Symfony/Component/Console/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Console/autoload.php',
+ '%{_datadir}/php/Symfony/Component/Console/autoload.php',
],
]);
EOF
@@ -158,6 +165,12 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 25 2017 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 0.9.4-1
- Update to 0.9.4