【问题标题】:Uncaught Error: Class 'GuzzleHttp\Client' not found未捕获的错误:找不到类“GuzzleHttp\Client”
【发布时间】:2019-01-23 09:07:26
【问题描述】:

在 magento2 中实现 https://github.com/maidmaid/zoho 时遇到问题。其余所有依赖项都已解决,但从作曲家它不是只读取 GuzzleHttp\Client 类并在第 24 行的 /vendor/Maidmaid/Zoho/Client.php 中给出错误“未捕获的错误:未找到类 'GuzzleHttp\Client'”

autoload_static.php 定义这个

'GuzzleHttp\\' => 
        array (
            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
        ),

并且在 autoload_psr4 中定义了这个

'Maidmaid\\Zoho\\' => array($vendorDir . '/maidmaid/zoho/src'),
    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),

如果有人可以帮助我解决这个问题,请。

谢谢

【问题讨论】:

    标签: magento2 zoho


    【解决方案1】:

    尝试添加以下行

    require_once 'vendor/autoload.php'
    

    【讨论】:

      【解决方案2】:

      你必须使用 composer 安装 Guzzle 包。

      首先进入你的项目目录,然后使用这个命令安装 guzzle

      composer require guzzlehttp/guzzle
      

      【讨论】:

        猜你喜欢
        • 2019-08-29
        • 1970-01-01
        • 2023-02-11
        • 2017-11-29
        • 2015-09-22
        • 1970-01-01
        • 2017-04-08
        • 2018-04-02
        • 1970-01-01
        相关资源
        最近更新 更多