* [misc] Add namespace by patch to avoid class conflict with the Parsedown library.

This commit is contained in:
liugang
2025-10-27 09:08:21 +08:00
parent faa95102d5
commit f98ac8b030
10 changed files with 42 additions and 4 deletions
+8
View File
@@ -35,9 +35,17 @@
},
"extra": {
"patches": {
"erusev/parsedown": {
"Add namespace to Parsedown class": "patches/parsedown-add-namespace.patch"
},
"gorhill/php-fine-diff": {
"Fix class reference to work with namespaces": "patches/finediff-fix-class-reference.patch"
}
}
},
"autoload": {
"psr-4": {
"Vendor\\Parsedown\\": "vendor/erusev/parsedown/"
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2fa0dc942e82ae977b4bf8054f8d603c",
"content-hash": "062e871a7ba56633ed9dffe989091156",
"packages": [
{
"name": "box/spout",
+1 -1
View File
@@ -3,7 +3,7 @@ require_once dirname(__FILE__, 2) . '/base/delegate/delegate.class.php';
class parsedown extends baseDelegate
{
protected static $className = 'Parsedown';
protected static $className = 'Vendor\Parsedown\Parsedown';
public function __construct()
{
@@ -0,0 +1,8 @@
--- a/vendor/erusev/parsedown/Parsedown.php
+++ b/vendor/erusev/parsedown/Parsedown.php
@@ -1,4 +1,5 @@
<?php
+namespace Vendor\Parsedown;
#
#
+1
View File
@@ -9,6 +9,7 @@ return array(
'phpseclib3\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
'cweagans\\Composer\\' => array($vendorDir . '/cweagans/composer-patches/src'),
'WpOrg\\Requests\\' => array($vendorDir . '/rmccue/requests/src'),
'Vendor\\Parsedown\\' => array($vendorDir . '/erusev/parsedown'),
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'PhpOffice\\PhpWord\\' => array($vendorDir . '/phpoffice/phpword/src/PhpWord'),
+8
View File
@@ -86,6 +86,10 @@ class ComposerStaticIniteb70fe9ec81c9f50588dedfb7a386792
array (
'WpOrg\\Requests\\' => 15,
),
'V' =>
array (
'Vendor\\Parsedown\\' => 17,
),
'S' =>
array (
'Symfony\\Component\\Finder\\' => 25,
@@ -140,6 +144,10 @@ class ComposerStaticIniteb70fe9ec81c9f50588dedfb7a386792
array (
0 => __DIR__ . '/..' . '/rmccue/requests/src',
),
'Vendor\\Parsedown\\' =>
array (
0 => __DIR__ . '/..' . '/erusev/parsedown',
),
'Symfony\\Component\\Finder\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/finder',
+5
View File
@@ -218,6 +218,11 @@
},
"time": "2019-12-30T22:54:17+00:00",
"type": "library",
"extra": {
"patches_applied": {
"Add namespace to Parsedown class": "patches/parsedown-add-namespace.patch"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
+2 -2
View File
@@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5f83c88b4d1af794b335f1cab1e918fe88526d5f',
'reference' => 'a25da45b71dd97cd376b604d92a798a231173c51',
'name' => '__root__',
'dev' => true,
),
@@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5f83c88b4d1af794b335f1cab1e918fe88526d5f',
'reference' => 'a25da45b71dd97cd376b604d92a798a231173c51',
'dev_requirement' => false,
),
'box/spout' => array(
+7
View File
@@ -0,0 +1,7 @@
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:
Add namespace to Parsedown class
Source: patches/parsedown-add-namespace.patch
+1
View File
@@ -1,4 +1,5 @@
<?php
namespace Vendor\Parsedown;
#
#