phpDocumentor / phpDocumentor/ReflectionDocBlock

Location information for tags

Open
#87 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted in discussion
Dominant language
PHP
Stars
9.4k
Forks
137
Avg merge
4d 2h
Merged PRs (30d)
1

Description

I am using this package in the open PHP language server, which provides static analysis for any IDE through the open language server protocol. One of these features is "Go to Definition". This is currently implemented for the actual PHP code through nikic's great PHPParser, where every node has a file start/end offset so I can calculate which node the user clicked. It would be nice to have this feature for types in docblock tags like @var too, but the tags don't have any start/end offset data. Would it be possible to add this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by locating how @var and other docblock tags are parsed and compare their metadata with PHPParser nodes. Define how tag start and end offsets should be exposed, then verify that type tags provide usable location information without breaking existing parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.