Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support analyzing typed class constants #4829

Open
TysonAndre opened this issue Dec 26, 2023 · 0 comments
Open

Support analyzing typed class constants #4829

TysonAndre opened this issue Dec 26, 2023 · 0 comments

Comments

@TysonAndre
Copy link
Member

TysonAndre commented Dec 26, 2023

Related to #4825

  1. Warn about using php-ast older than 1.1.1 in php 8.3+ https://github.com/nikic/php-ast/releases/tag/v1.1.1
  2. Parse the type from class types with php-ast and analyze (e.g. warn about invalid types, type mismatches, etc, use it to improve type signatures if exact types/values of the expression can't be inferred)
  3. Use php-ast version 100 when php-ast is 1.1.1 or newer https://github.com/nikic/php-ast/releases/tag/v1.1.1

    In AST version 100, AST_CLASS_CONST_GROUP nodes have a type child node to represent typed class constants.

For the fallback parser:

  1. Work with maintainers of https://github.com/microsoft/tolerant-php-parser to support types on classes and update the dependency when a release is created
  2. Update src/Phan/AST/TolerantASTConverter/TolerantASTConverter.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant