Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[VarDumper] Improve dump of AMQP* Object#21557
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
stof commentedFeb 7, 2017
shouldn't we rather avoid all the useless info instead of overwriting the existing ones ? |
lyrixx commentedFeb 8, 2017
The things is: it's hard to know when property X or property Y has been added in the extension. So If we want to avoid overwriting, we should check for each property if it has been defined before. WDYT? |
stof commentedFeb 8, 2017
Well, you are switching the prefix globally anyway, which implies that they all changed together. |
lyrixx commentedFeb 8, 2017
Indeed. But anyway But just to be sure I understand, you propose something like that: // Recent version of the extension already expose internal propertiesif (isset($a["\x00AMQPConnection\x00login"])) {$a += [ Caster::PREFIX_VIRTUAL.'isConnected' =>$c->isConnected(), ];return$a; }$prefix = Caster::PREFIX_VIRTUAL;// BC layer in the amqp libif (method_exists($c,'getReadTimeout')) {$timeout =$c->getReadTimeout(); }else {$timeout =$c->getTimeout(); }$a +=array($prefix.'isConnected' =>$c->isConnected(),$prefix.'login' =>$c->getLogin(),$prefix.'password' =>$c->getPassword(),$prefix.'host' =>$c->getHost(),$prefix.'vhost' =>$c->getVhost(),$prefix.'port' =>$c->getPort(),$prefix.'read_timeout' =>$timeout, );return$a; |
lyrixx commentedFeb 8, 2017
@stof I updated my PR according to your comments. |
The release ofhttps://github.com/pdezwart/php-amqp/ 1.7.0alpha1changed internally the handlings of AMQP* object. So now when dumpingusing var_dump(), many information are availables. So many informationare displayed twice. This commit fixes this issue and keeps displaying basicinformation for older version of the lib.Reference:*https://pecl.php.net/package-info.php?package=amqp&version=1.7.0alpha1*php-amqp/php-amqp@314afbc (and next commits)
stof commentedFeb 8, 2017
👍 Btw, don't we need to update some tests ? |
lyrixx commentedFeb 8, 2017
This part is not tested... :/ |
nicolas-grekas commentedFeb 11, 2017
Thank you@lyrixx. |
This PR was merged into the 2.8 branch.Discussion----------[VarDumper] Improve dump of AMQP* Object| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | ----The release ofhttps://github.com/pdezwart/php-amqp/ 1.7.0alpha1changed internally the handling of AMQP* object. So now when dumpingusing var_dump(), many information are available. So many informationare displayed twice. This commit fixes this issue and keeps displaying basicinformation for older versions of the lib.Reference:*https://pecl.php.net/package-info.php?package=amqp&version=1.7.0alpha1*php-amqp/php-amqp@314afbc (and next commits)---Commits-------c553352 [VarDumper] Improve dump of AMQP* Object
Uh oh!
There was an error while loading.Please reload this page.
The release ofhttps://github.com/pdezwart/php-amqp/ 1.7.0alpha1
changed internally the handling of AMQP* object. So now when dumping
using var_dump(), many information are available. So many information
are displayed twice. This commit fixes this issue and keeps displaying basic
information for older versions of the lib.
Reference: