This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
Releases: hhvm/hack-router
Releases · hhvm/hack-router
Support additional typechecker restrictions
This release supports:
safe_array=true
andsafe_vector_array=true
enable_experimental_tc_features=no_fallback_in_namespaces
(nightlies, expected in 3.25)
Support HHVM 3.24, require HHVM 3.23+
No other changes.
Remove support for FastRoute
This makes the release compatible with the typechecker in HHVM 3.23, however it retains support for HHVM 3.21 and HHVM 3.23.
Use HSL v1.0
No other changes.
Support for alternative resolvers; no longer use FastRoute by default
Changes
- This release no longer uses FastRoute by default, and support for it will be removed from future releases; this is primarily because the included HHI will not be compatible with the changes to shapes in HHVM 3.23.
BaseRouter::getCacheFilePath()
has been removed, as not all resolvers support it; if you need to specify this, overloadBaseRouter::getResolver()
.- The new default resolver will automatically cache in APC if composer was ran with
--no-dev
- This release uses the Hack Standard Library, so hhvm-autoload is required; this means you need to include
vendor/hh_autoload.php
instead ofvendor/autoload.php
in your projects
Performance
Preliminary benchmarks also show substantial performance improvements with the new resolver when using a large random URI map (3718 entries) and example URI list (6639):
- in development environments (uncached), from 2.5s per request to 42ms
- in production environments (cached), from 26ms to 3ms
You can revert to FastRoute by overriding BaseRouter::getResolver()
; please file an issue explaining your needs if you do this, as FastRoute support is going to be completely removed before HHVM 3.23 is released.
Roadmap
This release supersedes v1.0.0rc8; I've removed the 'RC' labelling as I'm now expecting more substantial changes before v1.0:
- v0.10: remove support for FastRoute to support HHVM 3.23 and above.
- v0.11: replace usage of Hack Collections (Vector, Set, Map, and their immutable variants) with vec/dict/keyset.
- v0.12+: broader API review and feature improvements, including support for a Hack-specific alternative to PSR-7
Support for HHVM 3.18
No other significant changes
Add UriPattern::slash() and ::stringWithSlashes()
Equivalent to ::literal('/')