Titon is a full-stack web framework built on Hack that runs in HHVM. It is written with simplicity and efficiency in mind, with enough room for extensibility and abstraction. The framework takes advantage of Hack's strict mode, type system, generics, collections, and more. It also integrates the wonderful PSRs from PHP-FIG for increased interoperability with external PHP code bases and libraries.
Looking for more information? Find us in #titon on FreeNode.
A handful of packages have already been ported over from their old PHP codebase to Hack. However, they have not been linted against Hack's strict type checker yet.
The following packages are still in the porting process.
- Cache
- HTTP
- IO
The following packages have yet to be ported over.
The following packages are planned for future releases.
- Auth
- ACL
- Dependency/Service Containers
- Session
- Kernel
- ADR
- Queue
The following packages have been linted against Hack's type checker. They will still fail the checker with unbound errors, or mixed type warnings, but there's nothing we can do until HHVM and Hack are patched.
- Common
- Controller
- Debug
- Environment
- Event
- Route
- Type
- Utility
- View
Titon is built on Hack and requires HHVM 3.3.0+. It also requires Composer for its autoloader and for dependencies to be installed for testing.
Since the project is heavy in development, there currently exists no documentation or installation process. Feel free to mess around with the code or stay tuned for any updates.
Titon is looking for any knowledgable PHP developers that are looking to get their feet wet in Hack. Chat with us over in #titon for more information.
Titon comes packaged with a Vagrant box and a handful of Python scripts to ease the testing process.
Boot up the Vagrant instance with vagrant up and SSH into the box with vagrant ssh.
Once in Vagrant, you can run the following command to run all tests.
/vagrant/bin/run-testsOr run tests for a single file or folder.
/vagrant/bin/run-tests --path=Titon/CommonOr filter tests based on class or method name.
/vagrant/bin/run-tests --filter=methodNameFor the most part, Titon strives to be strict mode only. This can be very challenging, but with Hack's built-in linter, it couldn't be easier. Simply run the following command to check for strict issues.
/vagrant/bin/lint-hackOr lint a specific folder.
/vagrant/bin/lint-hack --path=Titon/UtilityTiton requires a modified PHPUnit to run tests properly. Simply modify the local file Framework\TestSuite.php and change this.
$shortname = basename($filename, '.php');To the following. This will allow .hh file extensions to be located.
$shortname = basename(basename($filename, '.hh'), '.php');
