This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
4.8.0: API changes, require HHVM 4.8
This release:
- requires HHVM 4.8 due to changes in parser output
- renames
HHAST\EditableNode
toHHAST\Node
, andHHAST\EditableList
toHHAST\NodeList
; 'editable' was a misleading historical artifact - removes magic
NodeList::getItems()
andNodeList::getItemsOfType($classname)
wrappers, which would behave differently depending on if the children wereListItem
s or not - makes
ListItem
generic in terms of the single child class - adds
NodeList::getChildrenOfItems()
as a clearer, type-safe, less magic replacement ofNodeList::getItems()
, which is only available if theNodeList
is aNodeList<ListItem<T>>
- also added
NodeList::getChildrenOfItemsOfType($classname)
as a replacement forNodeList::getItemsOfType()
- makes
vendor/bin/hhast-*
hack executables instead of shell script wrappers
In most cases, code directly using HHAST (such as custom linters) can be migrated with:
find linters/ -type f | xargs sed -i 's/EditableList/NodeList/g'
find linters/ -type f | xargs sed -i 's/Editable//g'
find linters/ -type f | xargs sed -i 's/getItems/getChildrenOfItems/g'
For MacOS, replace sed
with gsed
from the gnu-sed
homebrew package.