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

fixed NS #194

Merged
merged 1 commit into from
Sep 12, 2017
Merged

fixed NS #194

merged 1 commit into from
Sep 12, 2017

Conversation

chdeliens
Copy link
Contributor

was causing "PHP Fatal error: Cannot use Interop\Amqp\AmqpConsumer as AmqpConsumer because the name is already in use in enqueue/amqp-ext/Flags.php on line 5"

was causing "PHP Fatal error:  Cannot use Interop\Amqp\AmqpConsumer as AmqpConsumer because the name is already in use in enqueue/amqp-ext/Flags.php on line 5"
@makasim
Copy link
Member

makasim commented Sep 11, 2017

It definitely works at my side. Now I wonder how?

@makasim makasim added the bug label Sep 11, 2017
use Interop\Amqp\AmqpDestination as InteropAmqpDestination;
use Interop\Amqp\AmqpMessage as InteropAmqpMessage;
use Interop\Amqp\AmqpQueue as InteropAmqpQueue;
use Interop\Amqp\AmqpTopic as InteropAmqpTopic;
Copy link
Member

@makasim makasim Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we get rid of these imports and use Enqueue\AmqpExt\AmqpConsumer instead.

Same goes to other imported interfaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could, but the same I did above has been done in other classes.
I suggest to keep it that way for now and refactor mid-term. What do you think?

@chdeliens
Copy link
Contributor Author

I can reproduce on PHP 5.6.31 by running examples/consume.php.

@@ -2,11 +2,11 @@

namespace Enqueue\AmqpExt;

use Interop\Amqp\AmqpConsumer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be enought to remove this single line use Interop\Amqp\AmqpConsumer;. It must work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since AmqpConsumer from Enqueue implements InteropAmqpConsumer, it should work indeed! I'm gonna give it a quick test and keep you posted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works! Confirmed by testing on 5.6.31. Should work on other versions as well. let's go for it :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chdeliens great! Could you please update the PR?

@makasim makasim merged commit 17664b2 into php-enqueue:master Sep 12, 2017
ASKozienko pushed a commit that referenced this pull request Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants