hack-json-schema
hack-json-schema copied to clipboard
Fix how tests run so we don't rely on `assume_php`
Currently tests rely on:
- parsing a JSON schema
- generating a validator from it
- using that validator to execute tests
If these test files are marked as strict, it creates a chicken and egg problem. The class needs to exist before we can test it, but we need to run the tests to generate the validator. This is especially problematic when there is an error in the generated code while developing. It's often times useful to delete the currently generated file and regenerate it -- which only works if we have assume_php=true
and set the files to // partial
.
This is also absolutely required to support more recent versions of HHVM; assume_php
was removed in 4.1
This issue may be closed. We are not relying on assume_php
.
Yup looks like you're right. Marking all these as // strict
then I think we can close this: https://github.com/slackhq/hack-json-schema/pull/31
@mwildehahn This issue may be closed.