diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-11-05 13:01:40 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-11-05 13:01:40 +0100 |
commit | 161b1fd940aea42515e62b604eecf1f47a638e0d (patch) | |
tree | 8e60bd6a6ed9cf68e4d168806a3bcbeedd207262 | |
parent | 929e0e80d07925aed8bdcb6e19134885f6c74e75 (diff) |
apigen: add 1 upstream patch
-rw-r--r-- | apigen-upstream.patch | 25 | ||||
-rw-r--r-- | apigen.spec | 10 |
2 files changed, 34 insertions, 1 deletions
diff --git a/apigen-upstream.patch b/apigen-upstream.patch new file mode 100644 index 0000000..1ce36fa --- /dev/null +++ b/apigen-upstream.patch @@ -0,0 +1,25 @@ +Adapted for 4.1.1 from: + + +From e943361d3d2aff9fed9f68865f259f6da64106c0 Mon Sep 17 00:00:00 2001 +From: jadb <jadbitar@mac.com> +Date: Sun, 4 Oct 2015 10:50:24 -0400 +Subject: [PATCH] Fix #631 - Add condition for expected type + +--- + src/Generator/Resolvers/ElementResolver.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff -up ./src/Generator/Resolvers/ElementResolver.php.orig ./src/Generator/Resolvers/ElementResolver.php +--- ./src/Generator/Resolvers/ElementResolver.php.orig 2015-11-05 12:48:47.582855729 +0100 ++++ ./src/Generator/Resolvers/ElementResolver.php 2015-11-05 12:51:25.721529497 +0100 +@@ -151,7 +151,8 @@ class ElementResolver + } + } + +- if (($pos = strpos($definition, '::')) || ($pos = strpos($definition, '->'))) { ++ if (($reflectionElement instanceof ClassReflectionInterface) ++ && ($pos = strpos($definition, '::') || $pos = strpos($definition, '->'))) { + $reflectionElement = $this->resolveContextForClassProperty($definition, $reflectionElement, $pos); + $definition = substr($definition, $pos + 2); + diff --git a/apigen.spec b/apigen.spec index 327f3ba..c5fa3b7 100644 --- a/apigen.spec +++ b/apigen.spec @@ -17,7 +17,7 @@ Name: %{c_project} Version: 4.1.1 -%global specrel 2 +%global specrel 3 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: PHP source code API generator @@ -32,6 +32,9 @@ Source1: makesrc.sh # and drop Herrera dependencies (only used for phar selfupdate command) Patch0: %{name}-rpm.patch +# From upstream git repo +Patch1: %{name}-upstream.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} @@ -150,6 +153,7 @@ Smart and Readable Documentation for your PHP project. %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm +%patch1 -p1 rm -r tests/Herrera rm -r src/Herrera rm src/Command/SelfUpdateCommand.php @@ -201,6 +205,10 @@ rm -rf %{buildroot} %changelog +* Thu Nov 5 2015 Remi Collet <remi@fedoraproject.org> - 4.1.1-3 +- add upstream patch: add condition for expected type + https://github.com/ApiGen/ApiGen/issues/631 + * Tue Nov 3 2015 Remi Collet <remi@fedoraproject.org> - 4.1.1-2 - drop herrera from dependencies (only used for phar selfupdate command) |