src/Phinx/Config/Config.php
public static function fromJson($configFilePath)
    {
        $configArray = json_decode(file_get_contents($configFilePath), true);
        if (!is_array($configArray)) {
            throw new \RuntimeException(sprintf(
                'File \'%s\' must be valid JSON',
                $configFilePath
            ));
        }

        return new static($configArray, $configFilePath);
    }
public static function fromJson($configFilePath)
    {
        $configArray = json_decode(file_get_contents($configFilePath), true);
        if (!is_array($configArray)) {
            throw new \RuntimeException(sprintf(
                'File \'%s\' must be valid JSON',
                $configFilePath
            ));
        }

        return new static($configArray, $configFilePath);
    }
public static function fromJson ( $ configFilePath ) { $ configArray = json_decode ( file_get_contents ( $ configFilePath ) , true ) ; if ( ! is_array ( $ configArray ) ) { throw new \ RuntimeException ( sprintf ( 'File \'%s\' must be valid JSON' , $ configFilePath ) ) ; } return new static ( $ configArray , $ configFilePath ) ; }
Create a new instance of the config class using a JSON file path.

@param  string $configFilePath Path to the JSON File
@throws \RuntimeException
@return \Phinx\Config\Config
Create a new instance of the config class using a JSON file path .