Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'Pheanstalk_Pheanstalk' not found in Laravel 4 with Beanstalk

I'm trying to get beanstalk up and running and I'm getting the exception when trying to run Queue::push():

Class 'Pheanstalk_Pheanstalk' not found

I've run composer require pda/pheanstalk, and even regenerated my auto-load file an extra time.

It's happening in ./vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php

Any ideas?

like image 842
Anthony Avatar asked Jun 19 '14 16:06

Anthony


3 Answers

In composer.json, replace the pda/pheanstalk requirement line by

"pda/pheanstalk": "2.0.*"

Run

composer update

Warning: will also update Laravel.

Source: http://laravel.io/forum/07-17-2014-class-pheanstalk-pheanstalk-not-found

like image 149
Jerome Jaglale Avatar answered Nov 03 '22 12:11

Jerome Jaglale


Disregard. Found the answer at https://github.com/laravel/framework/issues/746. Apparently the newest version has been reorganized or something.

like image 45
Anthony Avatar answered Nov 03 '22 11:11

Anthony


You may be using pheanstalk 3 which didn't work for me with Laravel 4. Use this command to switch to an older version:

composer require pda/pheanstalk "~2.1"
like image 1
Bouke Versteegh Avatar answered Nov 03 '22 10:11

Bouke Versteegh