Releases: hhvm/definition-finder
Improved support for nullables, tuples, shapes, and callables
ScannedTypehint::getTypeName()
will never include the?
tokenScannedTypehint::isNullable()
was previously returning true for any type containing a?
token; this is inaccurate for types such astuple(?string, string)
. Fixed.ScannedTypehint::getTypeName()
will now return'tuple'
,'shape'
,'callable'
if appropriate; the full declaration is still available viaScannedTypehint::getTypeText()
- callables and tuple type names and type text are no longer incorrectly prefixed with the current namespace
- added support for the future
use namespace
syntax in Hack
Support for stringish tokens in namespace names
eg dict
is a type in hack, but this is still valid:
use Foo\Bar\Dict as Dict;
Support for T_VARRAY and T_DARRAY
This allows parsing of HHVM 3.19 and master.
These are for an experimental feature (likely temporary), not intended for general use.
Generic constraints: small BC break
Generics can now have multiple constraints:
class Foo<T super Bar as Baz> {
}
The getConstraintTypeName()
and getConstraintRelationship()
APIs have been replaced with getConstraints()
, returning ImmVector<shape('type' => string, 'relationship' => RelationshipToken)>
.
This release also no longer supports HHVM 3.12; HHVM 3.12 itself is also no longer supported by Facebook.
Parser improvements
definition-finder is now able to handle everything in:
hhvm/hphp/test/zend/good/
hhvm/hphp/test/slow/
hhvm/hphp/test/quick/
hhvm/hphp/runtime/ext/
hhvm/hphp/system/hphp/
hhvm/hphp/hack/hhi/
These fixes include:
16a87d1 Fix arrays as default parameters
7fa34c3 Support sub-namespaces in group use statements
0f6fbcb Fix 'function' or 'const' inside namespace group use statements
19de12a Fix trailing commas in group use statements
688937a Fix bracketed expressions as prefixes for parameter defaults
f82f72c Support type constants that reference other type constants
1b97c57 Support contraints on concrete type constants
251d456 Fix bit-shift in pseudomain being misinterpreted as attribute
756e51f Fix special names as namespaces
ada5936 Don't throw an exception for 'constants' where the name is an expression
5f38548 Support "use const"
0866be9 Improve support for use statements with multiple imports
523deac Improve support for anonymous classes
1d8a04a Add support for __halt_compiler()
Support hhvm-autoload again
Supporting installation on PHP in v1.4.2 broke usage with HHVM-autoload, as 'files' in composer.json no longer directly listed files with the definitions.
facebook/hhvm-autoload v1.2.0 adds support for hh_autoload.json files in dependencies.