summaryrefslogtreecommitdiffstats
path: root/php-victorjonsson-markdowndocs-php8.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-04-14 12:17:27 +0200
committerRemi Collet <remi@remirepo.net>2021-04-14 12:17:27 +0200
commit65118c05d59dc4b6cfe434a10f1460f86c7b3308 (patch)
treebf2140421990e1e190babb320bf593cfffd7b93c /php-victorjonsson-markdowndocs-php8.patch
parent80d8fa175f888c744b9737eeb4b53700c87e19d6 (diff)
update to 1.3.8HEADmaster
add patch for PHP 8 from https://github.com/victorjonsson/PHP-Markdown-Documentation-Generator/pull/25
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 ) {
+