From b13827bfde209c02e1503b72bea6c428c6522363 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Mar 2018 08:55:56 +0100 Subject: Update to 4.0.0 rename to php-nikic-php-parser4 and move to /usr/share/php/PhpParser4 raise dependency on PHP 7 use phpunit6 or phpunit7 (F28+) --- Makefile | 4 ++ composer.json | 6 +-- php-nikic-php-parser3-rpm.patch | 40 -------------------- php-nikic-php-parser4-rpm.patch | 29 +++++++++++++++ php-nikic-php-parser4.spec | 81 ++++++++++++++++++++++++----------------- 5 files changed, 83 insertions(+), 77 deletions(-) create mode 100644 Makefile delete mode 100644 php-nikic-php-parser3-rpm.patch create mode 100644 php-nikic-php-parser4-rpm.patch diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/composer.json b/composer.json index 66df90a..7ae425f 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,11 @@ } ], "require": { - "php": ">=5.5", + "php": ">=7.0", "ext-tokenizer": "*" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "autoload": { "psr-4": { @@ -24,7 +24,7 @@ "bin": ["bin/php-parse"], "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } } } diff --git a/php-nikic-php-parser3-rpm.patch b/php-nikic-php-parser3-rpm.patch deleted file mode 100644 index 739d7ab..0000000 --- a/php-nikic-php-parser3-rpm.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up ./bin/php-parse.rpm ./bin/php-parse ---- ./bin/php-parse.rpm 2016-04-19 15:41:41.000000000 +0200 -+++ ./bin/php-parse 2016-04-20 06:33:22.712063600 +0200 -@@ -1,12 +1,7 @@ - #!/usr/bin/env php - = 5.5 +BuildRequires: php(language) >= 7.0 BuildRequires: php-tokenizer -BuildRequires: php-filter +BuildRequires: php-reflection +BuildRequires: php-ctype BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl -BuildRequires: php-xmlreader -BuildRequires: php-xmlwriter # From composer.json, "require-dev": { -# "phpunit/phpunit": "~4.0|~5.0" -BuildRequires: php-composer(phpunit/phpunit) >= 4.0 +# "phpunit/phpunit": "^6.5 || ^7.0" +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 +%else +%global phpunit %{_bindir}/phpunit6 +BuildRequires: phpunit6 >= 6.5 +%endif +# Autoloader +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { -# "php": ">=5.5", +# "php": ">=7.0", # "ext-tokenizer": "*" -Requires: php(language) >= 5.5 +Requires: php(language) >= 7.0 Requires: php-tokenizer -# From phpcompatinfo report for version 3.0.2 -Requires: php-filter +# From phpcompatinfo report for version 4.0.0 +Requires: php-reflection +Requires: php-ctype Requires: php-json Requires: php-pcre Requires: php-spl -Requires: php-xmlreader -Requires: php-xmlwriter -%if %{eolv1} -Obsoletes: php-PHPParser < %{major} -%endif -%if %{eolv2} -Obsoletes: php-%{gh_owner}-%{pk_project} < %{major} -%endif Requires: php-cli +# Autoloader +BuildRequires: php-composer(fedora/autoloader) Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} %description -This is a PHP 5.2 to PHP 7.1 parser written in PHP. +This is a PHP 5.2 to PHP 7.2 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. This package provides the library version %{major} and the php-parse%{major} command. Documentation: https://github.com/nikic/PHP-Parser/tree/master/doc -Autoloader: %{php_home}/PhpParser%{major}/autoload.php +Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php %prep @@ -91,14 +91,20 @@ Autoloader: %{php_home}/PhpParser%{major}/autoload.php %build -# Empty build section, most likely nothing required. +: Generate an simple PSR-4 autoloader +cat << 'AUTOLOAD' | tee lib/%{ns_project}/autoload.php + - 4.0.0-1 +- Update to 4.0.0 +- rename to php-nikic-php-parser4 and move to /usr/share/php/PhpParser4 +- raise dependency on PHP 7 +- use phpunit6 or phpunit7 (F28+) + * Thu Mar 1 2018 Remi Collet - 3.1.5-1 - Update to 3.1.5 -- cgit