Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Releases: hhvm/definition-finder

Improved support for nullables, tuples, shapes, and callables

30 Jun 20:06
2e9e924
Compare
Choose a tag to compare
  • ScannedTypehint::getTypeName() will never include the ? token
  • ScannedTypehint::isNullable() was previously returning true for any type containing a ? token; this is inaccurate for types such as tuple(?string, string). Fixed.
  • ScannedTypehint::getTypeName() will now return 'tuple', 'shape', 'callable' if appropriate; the full declaration is still available via ScannedTypehint::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

23 Jun 23:57
b94f265
Compare
Choose a tag to compare

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

03 May 17:25
ccb1471
Compare
Choose a tag to compare

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

17 Feb 03:59
dfa55da
Compare
Choose a tag to compare

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

15 Feb 02:03
9bd4c5b
Compare
Choose a tag to compare

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

15 Feb 00:58
Compare
Choose a tag to compare

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.