This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
Releases: hhvm/hhast
Releases · hhvm/hhast
Support HHVM 4.0
v4.0.0 Update LSP test expectations
Target 3.30, improve NoEmptyStatementLinter
speed up execute_async again When hh-clilib moved to hsl-experimental IO\ , we lost the async wrappers around arbitrary resources. Made a mistake when implementing with builtins. Back to 5 min build
New linters, and updated dependencies
This release adds 3 new linters:
- a linter suggesting that all classes either be abstract or final
- an autofixing linter banning empty statements
- an autofixing linter converting PHP anonymous functions to lambdas
Additionally, this release:
- updates to hh-clilib v2. This includes moving to hsl-experimental IO abstractions
- Uses hack-codegen v4
Support HHVM/Hack 3.29, add migrations
This release:
- supports and requires HHVM/Hack 3.29
- supports typed user attributes, including 'unused use statement' linter fixes
- marks
EditableList::fromItems()
as<<__Deprecated>>
, in favor ofEditableList::createNonEmptyListOrMissing()
which is equivalent, but clearer about the behavior - adds
hhast-migrate --is-refinement
, replacingis_int()
withis int
and similar expressions.
This release also includes hhast-migrate --ltgt-to-ne
and --hhvm-3.28-to-3.29
, replacing <>
with !=
, which was added in v3.28.7
There have been several changes to the AST in this release; the most significant are:
- classes might not have a name (if the file being parsed is PHP; anonymous classes are not supported in Hack)
- attributes are no longer a unique node type; instead,
<<Foo>>
is a constructor call toFoo
(this is part of the 'typed user attributes' feature)
Improved PHPUnit support, new EditableList factory functions, `<>` to `!=` migration
This release:
- adds
bin/hhast-migrate --hhvm-3.28-to-3.29
and--ltgt-to-ne
replacing<>
with!=
; these operators are equivalent.<>
will be unsupported in Hack files in 3.29 - adds
EditableList::createNonEmptyListOrMissing()
andEditableList::createMaybeEmptyList()
, as equivalent replacements forEditableList::fromItems()
andnew EditableList()
respectively.fromItems()
is likely to be removed in a future release, and the constructor forEditableList
is likely to be made private. - adds support for migrating
@expectedException
attributes in the PHPUnit-to-HackTest migration
PHPUnit => hacktest + fbexpect improvements
- don't attempt to rewrite non-PHPUnit methods that have the same name as assertions to fbexpect - e.g.
$type_spec->assertType('foo')
is not a PHPUnit assertion - handle unqualified references to
PHPUnit_Framework_TestCase
as a base class - fix return types for migrated setup/teardown functions (they should be
Awaitable<void>
)
Improved @dataProvider PHPUnit => HackTest support
This release:
- improves whitespacing handling when migrating
@dataProvider
doccomment attributes - supports
/** @dataProvider foo */
as a single-line doccomment
Depend on difflib 1.0 instead of 0.2
No functional changes, just a dependency update.
Improved LSP stability, add PHPUnit-to-Hacktest Migration
This release:
- fixes several issues that could lead to partial messages to the IDE, or error/warning messages being mixed into the JSON-RPC stream
- adds
bin/hhast-migrate --phpunit-to-hacktest
, which migrates test suites from PHPUnit or Hacktest v0.x to HackTest v1.x
LSP stability, improved diff output in CLI
This release:
- prevents the IDE (LSP) integration from crashing when the IDE requests fixes (code actions) for lint errors in files containing parse errors
- provides better colored diff output when ran from the CLI