Summary: Depends on D9634. `phutil_json_decode` now throws an exception on invalid JSON.
Test Plan: Ran the unit tests.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D9641
$basename = basename($file);
$config = phutil_json_decode($config);
- if (!is_array($config)) {
- throw new Exception(
- "Invalid configuration in test '{$basename}', not valid JSON.");
- }
-
PhutilTypeSpec::checkMap(
$config,
array(