Bug: PHP parser not finding static method docblocks #327

Closed
opened 2025-03-09 10:37:56 +00:00 by jamie · 4 comments
jamie commented 2025-03-09 10:37:56 +00:00 (Migrated from git.hazaar.io)

Problem Statement

The PHP parser in Hazaar is not correctly identifying DocBlocks on static class methods. This results in missing or incomplete documentation when generating API documentation.

Who will benefit?

  • Developers relying on accurate API documentation.
  • Users of the Hazaar PHP parser for code analysis.
  • Any application using static methods that require documentation.

Expected Behavior

  • The parser should correctly detect and associate DocBlocks with static class methods.
  • API documentation should include descriptions, parameters, and return types for static methods.

Actual Behavior

  • DocBlocks on static methods are not being detected.
  • Generated documentation is missing descriptions and annotations for static methods.

Steps to Reproduce

  1. Create a class with a static method and a DocBlock above it.
  2. Run the Hazaar PHP parser.
  3. Check the output and observe that the static method lacks documentation.

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability/legislative cover)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)
## Problem Statement The PHP parser in Hazaar is not correctly identifying DocBlocks on static class methods. This results in missing or incomplete documentation when generating API documentation. ## Who will benefit? - Developers relying on accurate API documentation. - Users of the Hazaar PHP parser for code analysis. - Any application using static methods that require documentation. ## Expected Behavior - The parser should correctly detect and associate DocBlocks with static class methods. - API documentation should include descriptions, parameters, and return types for static methods. ## Actual Behavior - DocBlocks on static methods are not being detected. - Generated documentation is missing descriptions and annotations for static methods. ## Steps to Reproduce 1. Create a class with a static method and a DocBlock above it. 2. Run the Hazaar PHP parser. 3. Check the output and observe that the static method lacks documentation. ## Priority/Severity - [x] High (This will bring a huge increase in performance/productivity/usability/legislative cover) - [ ] Medium (This will bring a good increase in performance/productivity/usability) - [ ] Low (anything else e.g., trivial, minor improvements)
jamie commented 2025-03-09 10:37:56 +00:00 (Migrated from git.hazaar.io)

assigned to @jamie

assigned to @jamie
jamie commented 2025-03-09 21:32:49 +00:00 (Migrated from git.hazaar.io)

created branch 327-bug-php-parser-not-finding-static-method-docblocks to address this issue

created branch [`327-bug-php-parser-not-finding-static-method-docblocks`](/hazaar/framework/-/compare/master...327-bug-php-parser-not-finding-static-method-docblocks) to address this issue
jamie commented 2025-03-09 21:32:55 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !212

mentioned in merge request !212
jamie commented 2025-03-09 21:51:14 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 3b8b4b6804

mentioned in commit 3b8b4b68043c8873023f606d7fd999b986dcf6d2
jamie (Migrated from git.hazaar.io) closed this issue 2025-03-09 21:51:14 +00:00
jamie self-assigned this 2025-09-04 01:14:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/framework#327
No description provided.