This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Undefined constant AMQP_NOPARAM in AmqpStamp #54682
Comments
Note that this Symfony version is not maintained anymore. Even if you've identified a bug, you won't get any bugfixes unless you upgrade to a newer version.
The AMQP extension might be the something that you're missing. |
Hey 👋
Thanks for the upgrade tip, I can do it if the problem will be fixed with
it, but since it is a live and complex project it will take some time.
About AMQP extension I already have. Indeed with my quick fix push and
consumption work normally.
Thanks a lot.
…On Sat, Apr 20, 2024, 4:42 PM Alexander M. Turek ***@***.***> wrote:
6.3.12
Not that this Symfony version is not maintained anymore
<https://symfony.com/releases/6.3>. Even if you've identified a bug, you
won't get any bugfixes unless you upgrade to a newer version.
I must have been missing something or is it a bug?
The AMQP extension <https://pecl.php.net/package/amqp> might be the
something that you're missing.
—
Reply to this email directly, view it on GitHub
<#54682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQPKZOQTANBK76NVM66MR3Y6J5FJAVCNFSM6AAAAABGQP3NF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGY4TIOBTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
But the constant that you're missing should be defined by the AMQP extension. Maybe you're using an old version of it? |
Ok, I'll check it out.
…On Sun, Apr 21, 2024, 9:20 AM Alexander M. Turek ***@***.***> wrote:
But the constant that you're missing should be defined by the AMQP
extension. Maybe you're using an old version of it?
—
Reply to this email directly, view it on GitHub
<#54682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQPKZPTJG3SNPR5UHJMTZDY6NSCPAVCNFSM6AAAAABGQP3NF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXHEZTOMZZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@derrabus I am sorry for my above and incorrect reply. I do not have the pecl extension but on Ubuntu 22.04 I have |
@musahcoding having them installed is not enough. You can check via |
Thanks for the continued support, I think it is loaded, as I mentioned with that hack publish and consumption work, but also the following commands can confirm it too that the extension is loaded:
Somehow it seems that the apt implementation is different that pecl one. Even if that is the case, I would be happy to follow the pecl installation, but maybe you/we can emphasize in the symfony doc to use the pecl installation or else developers would run into this issue? 🤔 |
Can you also share the output of the following commands?
|
Hey!
|
Ubuntu ships the old v1 of the extension. I suspect that v1 does not have the constant (which is just an alias for zero anyway). So the fix might be that we're using |
So this proves that the constant is defined. Could it be that you run PHP in different contexts (CLI and web for example) and that the other context (the request channel in the log excerpt leads me to this assumption) doesn't have the extension enabled? |
This does not add up: Ubunto ships v1: https://packages.ubuntu.com/jammy/php-amqp |
@xabbuh I have already checked both web and CLI they use the same extensions. @derrabus I am using using LAMP image of digital oceans where they have references to more recent versions of PHP 8.3, I see
|
<?php
var_dump(AMQP_NOPARAM);
var_dump(phpversion('amqp')); What is the output of this script when you access it over your web server? |
Hey @xabbuh 👋 here it is:
|
I think he meant you should access it via web SAPI (via browser, curl, ...) instead of CLI SAPI. |
@discordier is right |
I think, I'm moving this to support now to reduce the noise on the bug tracker. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Symfony version(s) affected
6.3.12
Description
I just tried to use this package
symfony/amqp-messenger@6.3.12
last night and today noticed that I am receiving this exception:And when I search for the definition of the constant
AMQP_NOPARAM
invendor/symfony/amqp-messenger
, it seems it is not defined. To do a workaround I created this file atscripts/amqp-constants.php
:and added the following to
composer.json
:But it does not really look the right thing for me, I must have been missing something or is it a bug?
How to reproduce
I mentioned all the code above.
Possible Solution
I added my workaround above, maybe it could also be moved to the repo itself?
Additional Context
No response
The text was updated successfully, but these errors were encountered: