public function updateConfig($name, $path)
    {
        $name = str_replace('\\', '/', $name);
        $configFile = static::configFile($this->vendorDir);
        $this->ensureConfigFile($configFile);

        $return = include $configFile;
        if (is_array($return) && empty($config)) {
            $config = $return;
        }
        if (!isset($config)) {
            $this->io->write(
                'ERROR - `vendor/skinny-plugins.php` file is invalid. ' .
                'Plugin path configuration not updated.'
            );
            return;
        }
        if (!isset($config['plugins'])) {
            $config['plugins'] = [];
        }
        if ($path == null) {
            unset($config['plugins'][$name]);
        } else {
            $config['plugins'][$name] = $path;
        }
        $root = dirname($this->vendorDir);
        static::writeConfigFile($configFile, $config['plugins'], $root);
    }
public function updateConfig($name, $path)
    {
        $name = str_replace('\\', '/', $name);
        $configFile = static::configFile($this->vendorDir);
        $this->ensureConfigFile($configFile);

        $return = include $configFile;
        if (is_array($return) && empty($config)) {
            $config = $return;
        }
        if (!isset($config)) {
            $this->io->write(
                'ERROR - `vendor/skinny-plugins.php` file is invalid. ' .
                'Plugin path configuration not updated.'
            );
            return;
        }
        if (!isset($config['plugins'])) {
            $config['plugins'] = [];
        }
        if ($path == null) {
            unset($config['plugins'][$name]);
        } else {
            $config['plugins'][$name] = $path;
        }
        $root = dirname($this->vendorDir);
        static::writeConfigFile($configFile, $config['plugins'], $root);
    }
public function updateConfig ( $ name , $ path ) { $ name = str_replace ( '\\' , '/' , $ name ) ; $ configFile = static :: configFile ( $ this -> vendorDir ) ; $ this -> ensureConfigFile ( $ configFile ) ; $ return = include $ configFile ; if ( is_array ( $ return ) && empty ( $ config ) ) { $ config = $ return ; } if ( ! isset ( $ config ) ) { $ this -> io -> write ( 'ERROR - `vendor/skinny-plugins.php` file is invalid. ' . 'Plugin path configuration not updated.' ) ; return ; } if ( ! isset ( $ config [ 'plugins' ] ) ) { $ config [ 'plugins' ] = [ ] ; } if ( $ path == null ) { unset ( $ config [ 'plugins' ] [ $ name ] ) ; } else { $ config [ 'plugins' ] [ $ name ] = $ path ; } $ root = dirname ( $ this -> vendorDir ) ; static :: writeConfigFile ( $ configFile , $ config [ 'plugins' ] , $ root ) ; }
Update the plugin path for a given package.

@param string $name The plugin name being installed.
@param string $path The path, the plugin is being installed into.
Update the plugin path for a given package .