Skip to content

Commit

Permalink
Merge pull request opencart#13759 from mhcwebdesign/3.0.x.x
Browse files Browse the repository at this point in the history
[3.0.x.x] 3rd party vendor library update
  • Loading branch information
mhcwebdesign committed Mar 4, 2024
2 parents 2dab8de + 6be54b1 commit b7d52bd
Show file tree
Hide file tree
Showing 266 changed files with 5,874 additions and 12,083 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"divido/divido-php": ">=1.15",
"php": ">=7.3.0",
"scssphp/scssphp": "^1.11.0",
"zoujingli/wechat-developer": "^1.2",
"zoujingli/wechat-developer": "^1.2.17",
"twig/twig": "^3.3",
"zoujingli/wechat-php-sdk": "^1.3"
},
Expand Down
149 changes: 67 additions & 82 deletions composer.lock

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions upload/install/controller/install/step_2.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public function index() {
$data['text_zlib'] = $this->language->get('text_zlib');
$data['text_zip'] = $this->language->get('text_zip');
$data['text_mbstring'] = $this->language->get('text_mbstring');
$data['text_dom'] = $this->language->get('text_dom');
$data['text_hash'] = $this->language->get('text_hash');
$data['text_xmlwriter'] = $this->language->get('text_xmlwriter');
$data['text_json'] = $this->language->get('text_json');

$data['button_continue'] = $this->language->get('button_continue');
$data['button_back'] = $this->language->get('button_back');
Expand Down Expand Up @@ -145,6 +149,10 @@ public function index() {
$data['zip'] = extension_loaded('zip');
$data['iconv'] = function_exists('iconv');
$data['mbstring'] = extension_loaded('mbstring');
$data['dom'] = extension_loaded('dom');
$data['hash'] = extension_loaded('hash');
$data['xmlwriter'] = extension_loaded('xmlwriter');
$data['json'] = extension_loaded('json');

$data['catalog_config'] = DIR_OPENCART . 'config.php';
$data['admin_config'] = DIR_OPENCART . 'admin/config.php';
Expand Down Expand Up @@ -213,6 +221,22 @@ private function validate() {
$this->error['warning'] = $this->language->get('error_mbstring');
}

if (!extension_loaded('dom')) {
$this->error['warning'] = $this->language->get('error_dom');
}

if (!extension_loaded('hash')) {
$this->error['warning'] = $this->language->get('error_hash');
}

if (!extension_loaded('xmlwriter')) {
$this->error['warning'] = $this->language->get('error_xmlwriter');
}

if (!extension_loaded('json')) {
$this->error['warning'] = $this->language->get('error_json');
}

if (!file_exists(DIR_OPENCART . 'config.php')) {
$this->error['warning'] = $this->language->get('error_catalog_exist');
} elseif (!is_writable(DIR_OPENCART . 'config.php')) {
Expand Down
8 changes: 8 additions & 0 deletions upload/install/language/en-gb/install/step_2.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
$_['text_zlib'] = 'ZLIB';
$_['text_zip'] = 'ZIP';
$_['text_mbstring'] = 'mbstring';
$_['text_dom'] = 'DOM/XML';
$_['text_hash'] = 'Hash';
$_['text_xmlwriter'] = 'XMLWriter';
$_['text_json'] = 'JSON';
$_['text_on'] = 'On';
$_['text_off'] = 'Off';
$_['text_writable'] = 'Writable';
Expand All @@ -48,6 +52,10 @@
$_['error_zlib'] = 'Warning: ZLIB extension needs to be loaded for OpenCart to work!';
$_['error_zip'] = 'Warning: ZIP extension needs to be loaded for OpenCart to work!';
$_['error_mbstring'] = 'Warning: mbstring extension needs to be loaded for OpenCart to work!';
$_['error_dom'] = 'Warning: ZIP extension needs to be loaded for OpenCart to work!';
$_['error_hash'] = 'Warning: Hash extension needs to be loaded for OpenCart to work!';
$_['error_xmlwriter'] = 'Warning: XMLWriter extension needs to be loaded for OpenCart to work!';
$_['error_json'] = 'Warning: JSON extension needs to be loaded for OpenCart to work!';
$_['error_catalog_exist'] = 'Warning: config.php does not exist. You need to rename config-dist.php to config.php!';
$_['error_catalog_writable'] = 'Warning: config.php needs to be writable for OpenCart to be installed!';
$_['error_admin_exist'] = 'Warning: admin/config.php does not exist. You need to rename admin/config-dist.php to admin/config.php!';
Expand Down
56 changes: 56 additions & 0 deletions upload/install/view/template/install/step_2.twig
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,62 @@
{% endif %}</td>
</tr>
{% endif %}
<tr>
<td>{{ text_dom }}</td>
<td>{% if dom %}
{{ text_on }}
{% else %}
{{ text_off }}
{% endif %}</td>
<td>{{ text_on }}</td>
<td class="text-center">{% if dom %}
<span class="text-success"><i class="fa fa-check-circle"></i></span>
{% else %}
<span class="text-danger"><i class="fa fa-minus-circle"></i></span>
{% endif %}</td>
</tr>
<tr>
<td>{{ text_hash }}</td>
<td>{% if hash %}
{{ text_on }}
{% else %}
{{ text_off }}
{% endif %}</td>
<td>{{ text_on }}</td>
<td class="text-center">{% if hash %}
<span class="text-success"><i class="fa fa-check-circle"></i></span>
{% else %}
<span class="text-danger"><i class="fa fa-minus-circle"></i></span>
{% endif %}</td>
</tr>
<tr>
<td>{{ text_xmlwriter }}</td>
<td>{% if xmlwriter %}
{{ text_on }}
{% else %}
{{ text_off }}
{% endif %}</td>
<td>{{ text_on }}</td>
<td class="text-center">{% if xmlwriter %}
<span class="text-success"><i class="fa fa-check-circle"></i></span>
{% else %}
<span class="text-danger"><i class="fa fa-minus-circle"></i></span>
{% endif %}</td>
</tr>
<tr>
<td>{{ text_json }}</td>
<td>{% if json %}
{{ text_on }}
{% else %}
{{ text_off }}
{% endif %}</td>
<td>{{ text_on }}</td>
<td class="text-center">{% if json %}
<span class="text-success"><i class="fa fa-check-circle"></i></span>
{% else %}
<span class="text-danger"><i class="fa fa-minus-circle"></i></span>
{% endif %}</td>
</tr>
</tbody>
</table>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion upload/system/storage/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit505ae6f2a3616473de90938541c4614d::getLoader();
return ComposerAutoloaderInit56198b4abead21620fa739b22c3bfd4e::getLoader();
41 changes: 14 additions & 27 deletions upload/system/storage/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

/** @var ?string */
private $vendorDir;

Expand Down Expand Up @@ -109,7 +106,6 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -429,8 +425,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
includeFile($file);

return true;
}
Expand Down Expand Up @@ -560,26 +555,18 @@ private function findFileWithExtension($class, $ext)

return false;
}
}

/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}
1 change: 1 addition & 0 deletions upload/system/storage/vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
return array(
'Wechat\\' => array($vendorDir . '/zoujingli/wechat-php-sdk/Wechat'),
'WePay\\' => array($vendorDir . '/zoujingli/wechat-developer/WePay'),
'WePayV3\\' => array($vendorDir . '/zoujingli/wechat-developer/WePayV3'),
'WeMini\\' => array($vendorDir . '/zoujingli/wechat-developer/WeMini'),
'WeChat\\' => array($vendorDir . '/zoujingli/wechat-developer/WeChat'),
'Twig\\' => array($vendorDir . '/twig/twig/src'),
Expand Down
35 changes: 21 additions & 14 deletions upload/system/storage/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit505ae6f2a3616473de90938541c4614d
class ComposerAutoloaderInit56198b4abead21620fa739b22c3bfd4e
{
private static $loader;

Expand All @@ -24,27 +24,34 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInit505ae6f2a3616473de90938541c4614d', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit56198b4abead21620fa739b22c3bfd4e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit505ae6f2a3616473de90938541c4614d', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit56198b4abead21620fa739b22c3bfd4e', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit505ae6f2a3616473de90938541c4614d::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::getInitializer($loader));

$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit505ae6f2a3616473de90938541c4614d::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
$includeFiles = \Composer\Autoload\ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire56198b4abead21620fa739b22c3bfd4e($fileIdentifier, $file);
}

return $loader;
}
}

/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire56198b4abead21620fa739b22c3bfd4e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}
15 changes: 10 additions & 5 deletions upload/system/storage/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit505ae6f2a3616473de90938541c4614d
class ComposerStaticInit56198b4abead21620fa739b22c3bfd4e
{
public static $files = array (
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
Expand All @@ -24,6 +24,7 @@ class ComposerStaticInit505ae6f2a3616473de90938541c4614d
array (
'Wechat\\' => 7,
'WePay\\' => 6,
'WePayV3\\' => 8,
'WeMini\\' => 7,
'WeChat\\' => 7,
),
Expand Down Expand Up @@ -78,6 +79,10 @@ class ComposerStaticInit505ae6f2a3616473de90938541c4614d
array (
0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/WePay',
),
'WePayV3\\' =>
array (
0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/WePayV3',
),
'WeMini\\' =>
array (
0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini',
Expand Down Expand Up @@ -195,10 +200,10 @@ class ComposerStaticInit505ae6f2a3616473de90938541c4614d
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit505ae6f2a3616473de90938541c4614d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit505ae6f2a3616473de90938541c4614d::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit505ae6f2a3616473de90938541c4614d::$prefixesPsr0;
$loader->classMap = ComposerStaticInit505ae6f2a3616473de90938541c4614d::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::$prefixesPsr0;
$loader->classMap = ComposerStaticInit56198b4abead21620fa739b22c3bfd4e::$classMap;

}, null, ClassLoader::class);
}
Expand Down
Loading

0 comments on commit b7d52bd

Please sign in to comment.