public function getComposerBinDir($path)
    {
        if (is_dir($path)) {
            $composer = $path.'/composer.json';
            if (is_file($composer)) {
                $json = json_decode(file_get_contents($composer));

                if (isset($json->config->{"bin-dir"})) {
                    return $path.'/'.$json->config->{"bin-dir"};
                } elseif (is_dir($path . '/vendor/bin')) {
                    return $path  . '/vendor/bin';
                }
            }
        }
        return null;
    }
public function getComposerBinDir($path)
    {
        if (is_dir($path)) {
            $composer = $path.'/composer.json';
            if (is_file($composer)) {
                $json = json_decode(file_get_contents($composer));

                if (isset($json->config->{"bin-dir"})) {
                    return $path.'/'.$json->config->{"bin-dir"};
                } elseif (is_dir($path . '/vendor/bin')) {
                    return $path  . '/vendor/bin';
                }
            }
        }
        return null;
    }
public function getComposerBinDir ( $ path ) { if ( is_dir ( $ path ) ) { $ composer = $ path . '/composer.json' ; if ( is_file ( $ composer ) ) { $ json = json_decode ( file_get_contents ( $ composer ) ) ; if ( isset ( $ json -> config -> { "bin-dir" } ) ) { return $ path . '/' . $ json -> config -> { "bin-dir" } ; } elseif ( is_dir ( $ path . '/vendor/bin' ) ) { return $ path . '/vendor/bin' ; } } } return null ; }
Try to load the composer.json file in the building project
If the bin-dir is configured, return the full path to it
@param string $path Current build path
@return string|null
Try to load the composer . json file in the building project If the bin - dir is configured return the full path to it