dream02008 2019-02-26 11:03
浏览 55
已采纳

为什么我在Firestore SDK for PHP中为已弃用的类获取错误?

After upgrading to newer version of 'google/cloud-firestore' i'm getting an error.

That's error got:

Google\Cloud\Firestore\V1beta1\StructuredQuery_CollectionSelector is deprecated and will be removed in the next major release. Use Google\Cloud\Firestore\V1beta1\StructuredQuery\CollectionSelector instead at /var/www/procare-vendor/google/cloud/Firestore/src/V1beta1/StructuredQuery_CollectionSelector.php 15

There is my composer.json

    {
  "require": {
    "phpoffice/phpexcel" : "1.8.1",
    "phpmailer/phpmailer": "~5.2",
    "katzgrau/klogger": "dev-master",
    "itbz/fpdf": "1.7.3",
    "microsoft/windowsazure" : "*",
    "guzzlehttp/guzzle": "~6.0",
    "predis/predis": "^1.1",
    "google/cloud-firestore": "^1.1.0"
  }
}

PHP version 7.0.31 with gRPC extension installed

  • 写回答

2条回答 默认 最新

  • dongll0502 2019-02-27 13:15
    关注

    I found the issue.

    I have had an custom error handler in my project, which overwrites default php error handling and all configurations for error handling.

    That's the code:

    //Deal with catchable PHP errors
    if (AppConfig::resolveEnv() != AppConfig::ENV_LIVE && ! Request::getInstance()->isInConsole) {
        set_error_handler(function ($errno , $errstr, $errfile = null, $errline = null, $errcontext = array() ) {
    
            $ex = new AppException("{$errstr} at {$errfile} {$errline}");
            Application::getInstance()->renderKernelPanicAlert($ex);
        }, E_ALL);
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助
  • ¥15 STM32控制MAX7219问题求解答