We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello there, I got some troubles using a DSN string to configure my connection to rabbitMQ with the default %2f vhost name
%2f
<?php include('vendor/autoload.php'); use Enqueue\AmqpTools\ConnectionConfig; $dsn = "amqp://guest:guest@localhost:5672/%2f"; $config = (new ConnectionConfig($dsn))->parse(); var_dump($config->getVhost()); // string(1) "/"
<?php include('vendor/autoload.php'); use Enqueue\AmqpTools\ConnectionConfig; $dsn = "amqp://guest:guest@localhost:5672/%2f"; $config = (new ConnectionConfig($dsn))->parse(); var_dump($config->getVhost()); // string(0) ""
composer require enqueue/enqueue enqueue/amqp-lib
I think the problem is here:
enqueue-dev/pkg/amqp-tools/ConnectionConfig.php
Line 405 in 8b94d3a
Since the given vhost is %f the path is urldecoded to // and the ltrim command remove everything, leaving an empty string.
%f
//
ltrim
I tried to patch (with success) like this:
'vhost' => null !== ($path = $dsn->getPath()) ? (0 === strpos($path, '/') ? substr($path, 1) : $path) : null,
Is there anything I'm missing about this kind of configuration?
The text was updated successfully, but these errors were encountered:
That's a bug, only the first / has to be removed. Could you work on a fix?
/
Sorry, something went wrong.
35aa5cb
Merge pull request #697 from rpanfili/fix_696
14ab754
[amqp] fix #696 parsing vhost from amqp dsn
No branches or pull requests
Hello there, I got some troubles using a DSN string to configure my connection to rabbitMQ with the default
%2f
vhost nameExpected Behavior
Actual Behavior
Steps to Reproduce the Problem
composer require enqueue/enqueue enqueue/amqp-lib
Version:
I think the problem is here:
enqueue-dev/pkg/amqp-tools/ConnectionConfig.php
Line 405 in 8b94d3a
Since the given vhost is
%f
the path is urldecoded to//
and theltrim
command remove everything, leaving an empty string.I tried to patch (with success) like this:
Is there anything I'm missing about this kind of configuration?
The text was updated successfully, but these errors were encountered: