phan / phan/phan

Phan should support typing the values of classes that implement Traversable

Open
#3,533 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
5.6k
Forks
365
Avg merge
1h 25m
Merged PRs (30d)
6

Description

For example: https://gist.github.com/dasl-/3043063db918e189c705788877b4720c

Would be great if phan could support typing like * @param MyData<I> $data for classes that implement Traversable. I realize that Traversable<I> is already supported.

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 with the linked gist and the existing support for Traversable<I> to understand the requested MyData<I> behavior. Determine the affected type-inference paths and add coverage showing that classes implementing Traversable preserve the value type in annotations; done means the example is correctly accepted and analyzed.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.