View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001300XdebugFeature/Change requestpublic2016-05-12 21:232016-12-18 01:18
Assigned Tostof 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version2.4.0 
Target Version2.5.1Fixed in Version2.5.1 
Summary0001300: XDebug functions are not exposing their signature to Reflection
Descriptionthe Reflection API reports that functions have no arguments, while they actually have arguments for some of them
Steps To Reproducerun "php --re xdebug" to see the output. compare it to "php --re json" to see the output for "json_encode" for instance.
TagsNo tags attached.
Operating System
PHP Version7.0.5-7.0.9
Attached Files

- Relationships

-  Notes
derick (administrator)
2016-12-11 16:00

This seems like a good thing to do. Would you mind learning how to make such a patch yourself? It's not particularly difficult and I'm happy to give you pointers.
stof (developer)
2016-12-14 08:45

yeah, I could learn how to do it
derick (administrator)
2016-12-14 10:30

Okay, here are the pointers then:

At [^] you see a list with all of Xdebug's functions. The second argument is NULL instead of the "arginfo" that could be there.

arginfo structs are initialised with ZEND_BEGIN_ARG_INFO, or ZEND_BEGIN_ARG_INFO_EX.

This pull request ( [^]) adds for example ZEND_BEGIN_ARG_INFO structs to Mosquito. But it doesn't take into account the number of optional arguments. For that, you need the more complicated ZEND_BEGIN_ARG_INFO_EX.

The use of the more complicated ZEND_BEGIN_ARG_INFO_EX is seen in this Stack Overflow question: [^] -- its answer also has a good overview of what it does (and doesn't).

But the SO question, uses "0, 0, " everywhere, where it really should use a constant for the first argument (as seen in the Mosquito PR's "ZEND_SEND_BY_VAL"), with the possibilities at; [^] and the second argument is whether it returns a value or a reference (as denoted by the constants at [^]).

The different items for each argument are defined at [^] (ZEND_ARG_INFO etc.) With the pass_by_ref argument to this macro being either 0 or 1. (Always 0 in Xebug I think, as there is no pass_by_ref arguments).

Hope that helps :-)
derick (administrator)
2016-12-14 11:58

I have assigned you too. Please read the contributing guidelines at [^]

Thanks for volunteering :-)
stof (developer)
2016-12-14 13:27

In which branch should I do it ? xdebug_2_5 or master ?
derick (administrator)
2016-12-14 13:57

Your call. 2.5 is for bug fixes... The question is whether this is a bug fix or feature. I've tentatively scheduled it for 2.6 (master) though.
stof (developer)
2016-12-15 09:01

For reference, PR is at [^]
derick (administrator)
2016-12-16 12:34

Thanks a lot Christophe! I have merged this now.

- Issue History
Date Modified Username Field Change
2016-05-12 21:23 stof New Issue
2016-12-11 16:00 derick Note Added: 0003995
2016-12-11 16:00 derick Status new => acknowledged
2016-12-11 16:00 derick Target Version => 2.6.0dev
2016-12-13 21:46 derick Assigned To => derick
2016-12-13 21:46 derick Status acknowledged => feedback
2016-12-14 08:45 stof Note Added: 0004063
2016-12-14 08:45 stof Status feedback => assigned
2016-12-14 10:30 derick Note Added: 0004065
2016-12-14 10:31 derick Assigned To derick => stof
2016-12-14 11:58 derick Note Added: 0004066
2016-12-14 13:27 stof Note Added: 0004067
2016-12-14 13:57 derick Note Added: 0004068
2016-12-15 09:01 stof Note Added: 0004074
2016-12-16 12:34 derick Note Added: 0004076
2016-12-16 12:34 derick Status assigned => closed
2016-12-16 12:34 derick Resolution open => fixed
2016-12-16 12:34 derick Fixed in Version => 2.5.1
2016-12-18 01:18 derick Target Version 2.6.0dev => 2.5.1

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker