Skip to content

Conversation

@TysonAndre
Copy link
Member

This is based on #761 , which had merge conflicts and needed to address some review comments.

This supports the most basic form of class_alias, which probably
covers most use cases. It adds aliases for class_alias used in the
global scope with constant string arguments. (Including MyClass::class)

Fixes #521

#761 was refactored/rewritten based on my review comments. The following changes were added:

  • In this PR, functionality is disabled by default; set 'enable_class_alias_support' => true in a project's .phan/config.php in order to use this.
  • Account for daemon mode
    (Not fully tested with the config setting on yet)
  • Parse class_alias original and alias FQSENs in one phase,
    and create the entries in another phase
    (Keeps the number of times each file is parsed the same as before)
  • Follow variable naming conventions
  • Tests continue to pass.
  • Update NEWS

ebernhardson and others added 3 commits June 18, 2017 12:39
This supports the most basic form of class_alias, which probably
covers most use cases. It adds aliases for class_alias used in the
global scope with constant string arguments or the class referenced
via the ::class constant.

Fixes phan#521
This PR is based off of phan#586

- Account for daemon mode
  (Not fully tested with the config setting on yet)
- Parse class_alias original and alias FQSENs in one phase,
  and create the entries in another phase
  (Keeps the number of times each file is parsed the same as before)
- Follow variable naming conventions
- Tests continue to pass.
@TysonAndre TysonAndre merged commit e8e65fc into phan:master Jun 18, 2017
@TysonAndre TysonAndre deleted the class_alias branch June 23, 2017 04:10
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

Successfully merging this pull request may close these issues.

2 participants