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

Argument 1 passed to Anik\Laravel\Amqp\AmqpManager::__construct() must be an instance of Illuminate\Contracts\Foundation\Application, instance of Laravel\Lumen\Application given #2

Closed
kksffn opened this issue Feb 7, 2022 · 3 comments · Fixed by #3

Comments

@kksffn
Copy link

kksffn commented Feb 7, 2022

I try to use laravel-amqp with laravel/lumen api. When I try to publish a message (```` Amqp::publish($messages)```) I get the exception:
Argument 1 passed to Anik\Laravel\Amqp\AmqpManager::__construct() must be an instance of Illuminate\Contracts\Foundation\Application, instance of Laravel\Lumen\Application given.
Rewriting constructor of AmqpManager to __construct(Illuminate\Contracts\Foundation\Application $app) "solves" the problem.

@ssi-anik
Copy link
Owner

ssi-anik commented Feb 8, 2022

I am not getting it correctly. What is the difference between your suggestion and my implementation?

@ssi-anik ssi-anik mentioned this issue Feb 8, 2022
ssi-anik added a commit that referenced this issue Feb 8, 2022
@ssi-anik
Copy link
Owner

ssi-anik commented Feb 8, 2022

I have tagged a new release with v1.1. Updating the package should fix your issue.

@kksffn
Copy link
Author

kksffn commented Feb 8, 2022

Thank you, works perfect now.

@ssi-anik ssi-anik reopened this Feb 8, 2022
@ssi-anik ssi-anik closed this as completed Feb 8, 2022
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

Successfully merging a pull request may close this issue.

2 participants