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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.3 namespaces (Origin: bugzilla #642468) #4158

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component documentation for ---
Reported in version 1.7.3 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2011-02-16 15:23:18 +0000, Georg Andrew wrote:

Hello Dimitri

Thank you for the work you've done on doxygen, it's a great tool.

My question concerns PHP 5.3> namespaces, I do not know if it's a bug or a missing feature.

If I use bracketed namespaces, then doxygen does not document the code. I can only see the namespace in the list, but functions/classes are not documented.

On the other hand, non bracketed namespaces work fine, or at least what I managed to test so far.

Here's a small example (without the documentation tags):

  1. This one would be documented just fine (non bracketed namespace, where the namespace is defined at the start, as a simple line)

namespace Test;
class RandomClass {...}

  1. This one would not (bracketed namespace, where inside code is wrapped around "{}" )
    namespace Test
    {
    class RandomClass { ... }
    }

Best wishes

On 2011-02-25 19:50:26 +0000, Nicolas Briche wrote:

This also happens to me, starting with v1.7.2.

Up to 1.7.1, test # 1 wouldn't work, while # 2 would work.

Starting with 1.7.2 (including current SVN), # 1 works, but # 2 doesn't anymore.

I have too many classes written with the bracket syntax to switch them right now, so I'm kind of stuck with 1.7.1 for the time being...

On 2011-02-26 14:50:32 +0000, Dimitri van Heesch wrote:

Can one of you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem with doxygen 1.7.3?

On 2011-02-27 22:11:12 +0000, Georg Andrew wrote:

Hello Dimitri

You can checkout the project I'm currently working on from github:
https://github.com/pixelplant/ZeroG

There's also a file called "zerog.cfg" in the root, for doxygen (1.7.3)

On 2011-03-01 11:28:19 +0000, Nicolas Briche wrote:

Created attachment 182171
testcase, config file and results for 3 versions

Hello,

Here's the simplest case I could do:

2 files, one namespace per file.

One namespace is defined using brackets, the other using a one-liner.

Each namespace contains the same class (class Test, having one member $test).

The Doxyfile is a prod file, except the output path and language.

I've included the HTML results for 1.7.1 (Ubuntu Maverick official package), 1.7.2 (from SVN r745), current SVN.

For all results, both namespaces are listed in namespaces.html. But:

For html-1.7.1, Test1 is populated, Test2 is not.
For html-1.7.2 and html-svn, Test2 is populated, Test1 is not.

On 2011-04-04 13:26:16 +0000, Samu Voutilainen wrote:

This is really annoying... Confirming the behaviour. And since pre 1.7.4 versions don�t support namespaces even that well, Doxygen is almost useless for namespaced PHP applications at the moment :(

IMHO this is bug, and for PHP quite serious one.

On 2011-04-04 18:01:56 +0000, Dimitri van Heesch wrote:

Created attachment 185129
Patch to support PHP namespace with curly braces

Proposed patch against 1.7.4. Feedback is welcome.

On 2011-04-04 18:03:39 +0000, Dimitri van Heesch wrote:

(In reply to comment # 5)

This is really annoying... Confirming the behaviour. And since pre 1.7.4
versions don�t support namespaces even that well, Doxygen is almost useless for
namespaced PHP applications at the moment :(

IMHO this is bug, and for PHP quite serious one.

Instead of complaining you can also help fixing.
Anyway, please try the patch and let me know if it works.

On 2011-04-05 08:01:24 +0000, Nicolas Briche wrote:

Review of attachment 185129:

Works against the testcase I've made in Comment # 4.

Also tested against a current project, using a namespace defined by multiple files with both syntaxes. Also works.

Thanks!

On 2011-04-06 11:48:23 +0000, Samu Voutilainen wrote:

(In reply to comment # 7)

(In reply to comment # 5)

This is really annoying... Confirming the behaviour. And since pre 1.7.4
versions don�t support namespaces even that well, Doxygen is almost useless for
namespaced PHP applications at the moment :(

IMHO this is bug, and for PHP quite serious one.

Instead of complaining you can also help fixing.
Anyway, please try the patch and let me know if it works.

Sorry, I didn�t mean to be offensive, I just thought this wasn�t classified as a bug...

I tested the patch and it fixed the problem, many thanks!

On 2011-08-14 14:05:03 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.5. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment