After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 540292 - Doxygen refeers "defines" as "enum" in PHP code
Doxygen refeers "defines" as "enum" in PHP code
Status: RESOLVED DUPLICATE of bug 358976
Product: doxygen
Classification: Other
Component: general
1.5.6
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2008-06-26 10:42 UTC by Fred
Modified: 2012-03-14 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test source (73 bytes, application/octet-stream)
2012-03-14 16:10 UTC, Ivan Shpakov
Details

Description Fred 2008-06-26 10:42:01 UTC
Hi,

I've got the same problem than Romain Tartière's bug #358976.

Description of the bug : 
Doxygen refeers "defines" as "enum" in PHP code

Steps to reproduce:
1. Create a new config file using the wizard.
2. Select to include all entities and cross-ref'd source code
3. Output HTML only
4. Leave all other settings at their defaults.
5. Have the following script documented:
<?php
define( 'CONST1', 'Constant 1' );
define( 'CONST2', 'Constant 2' );
?>

Result in documentation :
- Enumerations 
    . enum   CONST1
    . enum   CONST2  

Thanks
Fred



+++ This bug was initially created as a clone of Bug #358976 +++

Considering this PHP input file :

-- BEGIN INPUT FILE --
<?php
define('foo', 'bar');
?>
--- END INPUT FILE ---

Generating the documentation of this produces the following result:

-- BEGIN SNIPPET --
Enumeration Type Documentation
enum foo
--- END SNIPPET ---

Looks strange: foo is a constant, not an enumeration...

$ doxygen --version
1.4.7

Debian GNU/Linux SID
Comment 1 Matt Farina 2010-10-14 18:54:50 UTC
This is a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=358976

I can confirm that this still happens in 1.7.2
Comment 2 Dimitri van Heesch 2010-11-02 20:09:14 UTC

*** This bug has been marked as a duplicate of bug 358976 ***
Comment 3 Ivan Shpakov 2012-03-14 16:10:07 UTC
Created attachment 209748 [details]
Test source
Comment 4 Ivan Shpakov 2012-03-14 16:11:33 UTC
doxygen version 1.8.0
Windows XP

Doxygen refeers "defines" as "enum" in PHP code

Source:
<?php
define ('CONSTNAME1', 0);
define ('CONSTNAME2', 'VALUE');
?>

Output:
Enumerations 
enum   CONSTNAME1  
enum   CONSTNAME2

Options:
EXTRACT_ALL = true
Output - HTML only
other options: by default

Temporarily I applying filter to replace: "define('CONSTNAME', VALUE)" => "const CONSTNAME = VALUE;" (C-style)