summaryrefslogtreecommitdiffstats
path: root/php-victorjonsson-markdowndocs-php8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-victorjonsson-markdowndocs-php8.patch')
-rw-r--r--php-victorjonsson-markdowndocs-php8.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/php-victorjonsson-markdowndocs-php8.patch b/php-victorjonsson-markdowndocs-php8.patch
new file mode 100644
index 0000000..da6e869
--- /dev/null
+++ b/php-victorjonsson-markdowndocs-php8.patch
@@ -0,0 +1,40 @@
+From 3a2849e39198fb58791c8aae3acca33daf891652 Mon Sep 17 00:00:00 2001
+From: Dave Redfern <david.redfern@madagasgar.com>
+Date: Wed, 20 Jan 2021 15:49:56 -0500
+Subject: [PATCH] Support PHP8
+
+---
+ .gitattributes | 6 ++++++
+ .gitignore | 4 ++++
+ composer.json | 7 ++++++-
+ src/PHPDocsMD/Reflector.php | 10 +---------
+ test/ExampleClass.php | 7 ++++---
+ test/MDTableGeneratorTest.php | 7 +++++--
+ test/ReflectorTest.php | 6 ++++--
+ test/UseInspectorTest.php | 9 +++++----
+ 8 files changed, 35 insertions(+), 21 deletions(-)
+ create mode 100644 .gitattributes
+ create mode 100644 .gitignore
+
+diff --git a/src/PHPDocsMD/Reflector.php b/src/PHPDocsMD/Reflector.php
+index a579e5e..598dec5 100644
+--- a/src/PHPDocsMD/Reflector.php
++++ b/src/PHPDocsMD/Reflector.php
+@@ -336,15 +336,7 @@ private function createParameterEntity(\ReflectionParameter $reflection, $docs)
+ */
+ static function getParamType(\ReflectionParameter $refParam)
+ {
+- $export = \ReflectionParameter::export([
+- $refParam->getDeclaringClass()->name,
+- $refParam->getDeclaringFunction()->name
+- ],
+- $refParam->name,
+- true
+- );
+-
+- $export = str_replace(' or NULL', '', $export);
++ $export = str_replace(' or NULL', '', (string)$refParam);
+
+ $type = preg_replace('/.*?([\w\\\]+)\s+\$'.current(explode('=', $refParam->name)).'.*/', '\\1', $export);
+ if( strpos($type, 'Parameter ') !== false ) {
+