Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with monolog #2

Closed
marinsagovac opened this issue Apr 3, 2018 · 2 comments
Closed

Issue with monolog #2

marinsagovac opened this issue Apr 3, 2018 · 2 comments

Comments

@marinsagovac
Copy link

Using symfony 4 there are issues when calling constructor new Nsq() like:

use OkStuff\PhpNsq\Message\Message;
use OkStuff\PhpNsq\PhpNsq;
use OkStuff\PhpNsq\Command\Base;

        $this->config = [
            "nsq" => [
                "nsqd-addrs" => [
                    "127.0.0.1:4150",
                ],
                "logdir" => "/tmp",
            ],
        ];

        $this->client = new PhpNsq($this->config);

        var_dump($this->client); exit;

It' triggered error even when force to use Logging from vendor PhpNsq:

php.CRITICAL: Class 'OkStuff\PhpNsq\Utility\Logging' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Class 'OkStuff\\PhpNsq\\Utility\\Logging' not found at /data/projects/...vendor/okstuff/phpnsq/src/phpnsq/PhpNsq.php:25)"} []

I've tried using alias as

use OkStuff\PhpNsq\Utility\Logging;

and changed a path:

"logdir" => "/tmp",

that has really full write access. Nothing helps.

On vendor if I comment a code:

    public function __construct($nsq)
    {
        $this->reader = new reader();
        $this->logger = new Logging("PHPNSQ", $nsq["nsq"]["logdir"]);
        $this->pool   = new Pool($nsq);
    }

It occured another errors from instance Pool.

@yerstd
Copy link
Collaborator

yerstd commented Apr 5, 2018

@marinsagovac It seems that your classes are not loaded correctly. Please check.

@frankfarmer
Copy link
Contributor

frankfarmer commented Apr 26, 2018

https://github.com/stackerzzq/phpnsq/tree/master/src/phpnsq/Utillity

Looks like that directory is named "Utillity" with two Ls, while the package name has only one L.

That's probably causing autoload problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants