Homec4science

Extract variable type information from pht() calls

Authored by epriestley <git@epriestley.com> on Nov 8 2016, 17:13.

Description

Extract variable type information from pht() calls

Summary:
Ref T5267. When extrating data from pht() calls, also extract the argument types and export them into the map so they can be used by consumers.

We recognize plurals (phutil_count(), new PhutilNumber) and genders (phutil_person()). We'll need to annotate the codebase for those, since they're currently runtime-only.

Test Plan:
Rebuilt extraction maps, got data like this (note "number" type annotation).

"Scaling pool \"%s\" up to %s daemon(s).": {
  "uses": [
    {
      "file": "/daemon/PhutilDaemonOverseer.php",
      "line": 378
    }
  ],
  "types": [
    null,
    "number"
  ]
},

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16823

Details

Committed
epriestley <git@epriestley.com>Nov 8 2016, 17:33
Pushed
aubortJan 31 2017, 17:16
Parents
rPH3f5109b66864: In prose diff dialogs (like "Show Details" in transactions), show "old", "new"…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH980367452522: Extract variable type information from pht() calls (authored by epriestley <git@epriestley.com>).Nov 8 2016, 17:33