简体   繁体   English

在 PHP 中找不到类 ClientBuilder(Neoxygen)

[英]Class ClientBuilder(Neoxygen) not found in PHP

Im trying to use Neoxygen in my PHP project.我试图在我的 PHP 项目中使用 Neoxygen。 but im getting this error:但我收到这个错误:

Class 'Neoxygen\NeoClient\ClientBuilder' not found in /var/www/html/work/api/vendor/myproj/myproj-core/src/MyProj/DatabaseTest/ManagersTest/AdminDbManagerTest.php.

my code :我的代码:

<?php
namespace MyProj\DatabaseTest\ManagersTest;
use myProjCore\Tasks\AbstractClasses\ApiTask;
use Neoxygen\NeoClient\ClientBuilder;

class AdminDbManagerTest extends ApiTask
{
    /**
     * Start the running of the task
     */
    public function start()
    {
        $this->testDB();
    }


    private function testDB()
    {
        $client = ClientBuilder::create()
            ->addConnection('default','http','localhost',7474)
            ->build();
    }

}

I can reach the class by pressing the ClientBuilder (on testDB function) So I guess that the class is recognizes the ClientBuilder.我可以通过按下ClientBuilder (在 testDB 函数上)来访问这个类所以我猜这个类可以识别 ClientBuilder。

Problem solved.问题解决了。 I pushed the files into my Git and pull them back and now it works.我将文件推入我的 Git 并将它们拉回来,现在它可以工作了。 I think that the problem was in the composer update that I did.我认为问题出在我所做的作曲家更新中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM