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

Class 'Pheanstalk\PheanstalkInterface' not found #27605

Closed
AymanElarian opened this issue Feb 21, 2019 · 6 comments
Closed

Class 'Pheanstalk\PheanstalkInterface' not found #27605

AymanElarian opened this issue Feb 21, 2019 · 6 comments

Comments

@AymanElarian
Copy link

AymanElarian commented Feb 21, 2019

  • Laravel Version: 5.7.25
  • PHP Version:7.2
  • Database Driver & Version:

Description:

with php artisan queue:listen command i receive

   Symfony\Component\Debug\Exception\FatalThrowableError  : Class 'Pheanstalk\PheanstalkInterface' not found

  at /Users/aymanelarian/xxx/xxxxxx/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php:35
    31|     protected function pheanstalk(array $config)
    32|     {
    33|         return new Pheanstalk(
    34|             $config['host'],
  > 35|             $config['port'] ?? PheanstalkInterface::DEFAULT_PORT,
    36|             $config['timeout'] ?? Connection::DEFAULT_CONNECT_TIMEOUT,
    37|             $config['persistent'] ?? false
    38|         );
    39|     }

  Exception trace:

  1   Illuminate\Queue\Connectors\BeanstalkdConnector::pheanstalk(["beanstalkd", "localhost", "default"])
      /Users/aymanelarian/xxx/xxxxxx/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php:22

  2   Illuminate\Queue\Connectors\BeanstalkdConnector::connect(["beanstalkd", "localhost", "default"])
      /Users/aymanelarian/xxx/xxxxxx/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:157

Steps To Reproduce:

run cmd after composer require "pda/pheanstalk" and config queue setting then listen to beanstalkd Queue it fail

@AymanElarian
Copy link
Author

AymanElarian commented Feb 21, 2019

it seem that namespace changed to Pheanstalk\Contract\PheanstalkInterface; and that mean laravel not optimised with the latest Pheanstalk

downgrading fix it for me

Package operations: 0 installs, 7 updates, 0 removals
  - Removing pda/pheanstalk (v4.0.0)
  - Installing pda/pheanstalk (v3.x-dev 5614ef4): Downloading (100%)

@crynobone
Copy link
Member

Pheanstalk 4 support will be introduced in 5.8, however it could be possible to add support to 5.7 while still maintaining 3.x support if @taylorotwell okay with that.

BTW I been using pheanstalk 4 on Laravel 5.7 for a week now and running smoothly.

@driesvints
Copy link
Member

5.7 will go into security mode only on the 4th of March but we could indeed add this in the meantime so people on 5.7 can still use it. I'll ping taylor about it.

@driesvints
Copy link
Member

@crynobone if you can send something in for 5.7 which doesn't breaks anything you can do so :)

@driesvints
Copy link
Member

Gonna close this then since it's not really a bug or anything.

@crynobone
Copy link
Member

@driesvints See #27622

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