nikic / nikic/php-ast

Ideas for things to change/remove in the next major version (2.0)

Open
#114 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
984
Forks
81
PR merge metrics
No merged PRs in 30d

Description

  1. Remove AST_LIST and mark it as deprecated, and remove it whenever AST version 50 is removed.

Related to #94 - It was overlooked

AST_LIST is still used in https://github.com/phan/phan/blob/1.2.2/src/Phan/Analysis/PreOrderAnalysisVisitor.php#L613 (incorrectly, will fix)

  1. Change the reflection arginfo of ast\parse_code and ast\parse_file to make the int $version mandatory

Remove legacy flags such as ast\flags\RETURNS_REF (alias of ast\flags\FUNC_RETURNS_REF mentioned in README)

Contributor guide

No contributing guide indexed for this repository

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

Review the AST_LIST use in src/Phan/Analysis/PreOrderAnalysisVisitor.php and the ast\parse_code, ast\parse_file, and reflection arginfo entry points mentioned in the issue. Check README references to legacy flags, then define completion as the listed deprecated AST_LIST and flag removals and the mandatory version argument being reflected consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.