public function update(array $options = [], array $packageNames = [])
    {
        $options = $this->getInstallResolver()->resolve($options);
        $installer = $this->buildInstaller($options);
        $installer->setUpdate(true);
        $installer->setUpdateWhitelist($packageNames);
        $status = $installer->run();

        if ($status !== 0) {
            throw new \RuntimeException(sprintf(
                'An error has been occurred with code: %s while resolving dependencies.',
                $status
            ));
        }
    }
public function update(array $options = [], array $packageNames = [])
    {
        $options = $this->getInstallResolver()->resolve($options);
        $installer = $this->buildInstaller($options);
        $installer->setUpdate(true);
        $installer->setUpdateWhitelist($packageNames);
        $status = $installer->run();

        if ($status !== 0) {
            throw new \RuntimeException(sprintf(
                'An error has been occurred with code: %s while resolving dependencies.',
                $status
            ));
        }
    }
public function update ( array $ options = [ ] , array $ packageNames = [ ] ) { $ options = $ this -> getInstallResolver ( ) -> resolve ( $ options ) ; $ installer = $ this -> buildInstaller ( $ options ) ; $ installer -> setUpdate ( true ) ; $ installer -> setUpdateWhitelist ( $ packageNames ) ; $ status = $ installer -> run ( ) ; if ( $ status !== 0 ) { throw new \ RuntimeException ( sprintf ( 'An error has been occurred with code: %s while resolving dependencies.' , $ status ) ) ; } }
Update plugins and themes installed previously.

@param array    $options      Options for updating packages
@param string[] $packageNames List of packages

@throws RuntimeException If any problem occurs while resolving dependencies
Update plugins and themes installed previously .