I have these definitions in my file:
define( 'PHPTree\Exception\DB_QUERY_EXP', 50 );
define( 'PHPTree\Exception\TC_EXP', 6 );
define( 'PHPTree\Controller\ALL_EVENTS', 'ALL' );
phpdoc creates this structure.xml:
<namespace name="PHPTree" full_name="PHPTree">
<namespace name="" full_name="PHPTree\">
<namespace name="Controller" full_name="PHPTree\\Controller">
<namespace name="" full_name="PHPTree\\Controller\"/>
<namespace name="Exception" full_name="PHPTree\\Exception">
<namespace name="" full_name="PHPTree\\Exception\"/>
Which is wrong, namespace must be "PHPTree\Exception", but not "PHPTree\\Exception".
If i delete this constants definition everything is okay and i have the right namespace: PHPTree\Exception, but with this constants phpdoc creates a mess=)
What is wrong?
What is wrong I cannot say currently, I have triaged this issue as a bug to be fixed before 2.0
Fix #729; constant names are incorrect with 'define'
With this commit we fix the way namespace and name are combined to get a correct
constant name in the Constant Descriptor. This is a tandem commit with
which fixes a bug in the Reflection library.
The Reflection library incorrectly transformed the define constant definition into a valid name. This has been fixed in the develop branch and will be released with the upcoming beta release