public function createBuild($env = null, $options = array())
    {
        @trigger_error('The method "createBuild" is deprecated since blackfire/php-sdk 1.14 and will be removed in 2.0. Use method "startScenario" instead.', E_USER_DEPRECATED);

        // BC layer
        if (!is_array($options)) {
            $options = array('title' => $options);
            if (func_get_args() >= 3) {
                $options['trigger_name'] = func_get_arg(2);
            }
            if (func_get_args() >= 4) {
                $options['metadata'] = (array) func_get_arg(3);
            }
        }

        $env = $this->getEnvUuid(null === $env ? $this->config->getEnv() : $env);
        $content = json_encode($options);
        $data = json_decode($this->sendHttpRequest($this->config->getEndpoint().'/api/v1/build/env/'.$env, 'POST', array('content' => $content), array('Content-Type: application/json')), true);

        return new Build($env, $data);
    }