summaryrefslogtreecommitdiffstats
path: root/apigen-upstream.patch
diff options
context:
space:
mode:
Diffstat (limited to 'apigen-upstream.patch')
-rw-r--r--apigen-upstream.patch25
1 files changed, 25 insertions, 0 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);
+