Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Class 'AMQPLibConnector' not found #58

Closed
SirbitoX opened this issue Aug 10, 2015 · 4 comments
Closed

Class 'AMQPLibConnector' not found #58

SirbitoX opened this issue Aug 10, 2015 · 4 comments

Comments

@SirbitoX
Copy link

Hi,

I'm trying to run the test.php file on Windows 7 OS/PHP 5.5.19 and I installed all dependencies using composer.json file. But when I run php test.php command I got:

Fatal error: Class 'AMQPLibConnector' not found in \path\to\celery-php\amqp.php on line 55

And I realized that this error comes up with:

if(class_exists('PhpAmqpLib\Connection\AMQPConnection'))
{
    require_once('amqplibconnector.php');
    require_once('amqplibconnectorssl.php');

}

Where it couldn't find PhpAmqpLib\Connection\AMQPConnection class. I think something with namespacing is wrong. Do you have any idea how should I fix it?

p.s. I tried to fix it by removing the "if" condition but I got the similar error in another line of code.

@smuuf
Copy link
Collaborator

smuuf commented Sep 10, 2015

Second. Seems to me like the autoload of ***AMQPConnector classes is not handled properly by Composer.

Albeit I am new to Composer and would hate to point finger at it prematurely.

@gjedeer
Copy link
Owner

gjedeer commented Oct 7, 2015

I'm fed up with composer bug reports. It seems like people are submitting Composer-related patches doing contradictory things. It's going back and forth, when somebody fixes a problem they have, it seems to always break dependencies for someone else.

Since I'm no authority when it comes to Composer, I'm not accepting any more of them. If someone who knows Composer very well is reading this, and willing to take responsibility of that part of Celery-PHP (handling bugs, preparing a test case, making sure it doesn't break non-composer installs etc), please contact me.

Previous Composer-related bugs:

@gjedeer
Copy link
Owner

gjedeer commented Oct 7, 2015

And in regard to your particular problem: just use it without composer until it's fixed, require_once celery.php and you're done.

@jdufresne
Copy link
Collaborator

This should now be fixed in commit 099ffda. If you're willing, please install the latest dev version to test. Please let me know if you're still experiencing the same issues.

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

No branches or pull requests

4 participants