protected function removeDisabledInstallers()
    {
        $extra = $this->composer->getPackage()->getExtra();

        if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
            // No installers are disabled
            return;
        }

        // Get installers to disable
        $disable = $extra['installer-disable'];

        // Ensure $disabled is an array
        if (!is_array($disable)) {
            $disable = array($disable);
        }

        // Check which installers should be disabled
        $all = array(true, "all", "*");
        $intersect = array_intersect($all, $disable);
        if (!empty($intersect)) {
            // Disable all installers
            $this->supportedTypes = array();
        } else {
            // Disable specified installers
            foreach ($disable as $key => $installer) {
                if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
                    unset($this->supportedTypes[$installer]);
                }
            }
        }
    }
protected function removeDisabledInstallers()
    {
        $extra = $this->composer->getPackage()->getExtra();

        if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
            // No installers are disabled
            return;
        }

        // Get installers to disable
        $disable = $extra['installer-disable'];

        // Ensure $disabled is an array
        if (!is_array($disable)) {
            $disable = array($disable);
        }

        // Check which installers should be disabled
        $all = array(true, "all", "*");
        $intersect = array_intersect($all, $disable);
        if (!empty($intersect)) {
            // Disable all installers
            $this->supportedTypes = array();
        } else {
            // Disable specified installers
            foreach ($disable as $key => $installer) {
                if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
                    unset($this->supportedTypes[$installer]);
                }
            }
        }
    }
protected function removeDisabledInstallers ( ) { $ extra = $ this -> composer -> getPackage ( ) -> getExtra ( ) ; if ( ! isset ( $ extra [ 'installer-disable' ] ) || $ extra [ 'installer-disable' ] === false ) { // No installers are disabled return ; } // Get installers to disable $ disable = $ extra [ 'installer-disable' ] ; // Ensure $disabled is an array if ( ! is_array ( $ disable ) ) { $ disable = array ( $ disable ) ; } // Check which installers should be disabled $ all = array ( true , "all" , "*" ) ; $ intersect = array_intersect ( $ all , $ disable ) ; if ( ! empty ( $ intersect ) ) { // Disable all installers $ this -> supportedTypes = array ( ) ; } else { // Disable specified installers foreach ( $ disable as $ key => $ installer ) { if ( is_string ( $ installer ) && key_exists ( $ installer , $ this -> supportedTypes ) ) { unset ( $ this -> supportedTypes [ $ installer ] ) ; } } } }
Look for installers set to be disabled in composer's extra config and
remove them from the list of supported installers.

Globals:
- true, "all", and "*" - disable all installers.
- false - enable all installers (useful with
wikimedia/composer-merge-plugin or similar)

@return void
Look for installers set to be disabled in composer s extra config and remove them from the list of supported installers .