protected function getConsoleFile()
    {
        if (strpos($_SERVER['argv'][0], 'phpunit') !== false) {
            $kernelDir = $this->getContainer()->get('kernel')->getRootDir();
            if (is_file("$kernelDir/console")) {
                return "$kernelDir/console";
            }
            if (is_file("$kernelDir/../bin/console")) {
                return "$kernelDir/../bin/console";
            }
            throw new \Exception("Can not determine the name of the symfony console file in use for running as separate process");
        }

        return $_SERVER['argv'][0]; // sf console
    }
protected function getConsoleFile()
    {
        if (strpos($_SERVER['argv'][0], 'phpunit') !== false) {
            $kernelDir = $this->getContainer()->get('kernel')->getRootDir();
            if (is_file("$kernelDir/console")) {
                return "$kernelDir/console";
            }
            if (is_file("$kernelDir/../bin/console")) {
                return "$kernelDir/../bin/console";
            }
            throw new \Exception("Can not determine the name of the symfony console file in use for running as separate process");
        }

        return $_SERVER['argv'][0]; // sf console
    }
protected function getConsoleFile ( ) { if ( strpos ( $ _SERVER [ 'argv' ] [ 0 ] , 'phpunit' ) !== false ) { $ kernelDir = $ this -> getContainer ( ) -> get ( 'kernel' ) -> getRootDir ( ) ; if ( is_file ( "$kernelDir/console" ) ) { return "$kernelDir/console" ; } if ( is_file ( "$kernelDir/../bin/console" ) ) { return "$kernelDir/../bin/console" ; } throw new \ Exception ( "Can not determine the name of the symfony console file in use for running as separate process" ) ; } return $ _SERVER [ 'argv' ] [ 0 ] ; // sf console }
Returns the file-path of the symfony console in use, based on simple heuristics
@return string
@todo improve how we look for the console: we could fe. scan all of the files in the kernel dir, or look up the full process info based on its pid
Returns the file - path of the symfony console in use based on simple heuristics