microsoft / microsoft/tolerant-php-parser

Why is QualifiedName::getResolvedName disabled for Node\TraitUseClause?

Open
#400 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
894
Forks
85
Avg merge
2d 13h
Merged PRs (30d)
3

Description

When I need to resolve the FQN of the use TestTrait I cannot use the handy getResolvedName. Why is that?

namespace YYY;

use \XXX\TestTrait;

class TestClazz
{
	use TestTrait;

https://github.com/microsoft/tolerant-php-parser/blame/84ce745a39619b10734c8e6b736e055b9fa64d13/src/Node/QualifiedName.php#L88

Thanks!

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

Start in src/Node/QualifiedName.php around the disabled getResolvedName logic referenced by the issue, and trace how Node\TraitUseClause is handled. Compare the example namespace and trait-use nodes with the supported cases; done means establishing whether resolution should support this node and documenting or implementing the required change.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.