original_string: protected function unregisterPackage($vendor, $package, $relPackagePath)
      {
          $this->info('Unregister package from composer.json.');
  
          $composerJson = $this->loadComposerJson();
  
          unset($composerJson['require']["$vendor\\$package\\"]);
  
          $repositories = array_filter($composerJson['repositories'], function ($repository) use ($relPackagePath) {
              return $repository['type'] !== 'path'
                  || $repository['url'] !== $relPackagePath;
          });
  
          $composerJson['repositories'] = $repositories;
  
          if (count($composerJson['repositories']) === 0) {
              unset($composerJson['repositories']);
          }
  
          $this->saveComposerJson($composerJson);
  
          $this->info('Package was successfully unregistered from composer.json.');
      }
code: protected function unregisterPackage($vendor, $package, $relPackagePath)
      {
          $this->info('Unregister package from composer.json.');
  
          $composerJson = $this->loadComposerJson();
  
          unset($composerJson['require']["$vendor\\$package\\"]);
  
          $repositories = array_filter($composerJson['repositories'], function ($repository) use ($relPackagePath) {
              return $repository['type'] !== 'path'
                  || $repository['url'] !== $relPackagePath;
          });
  
          $composerJson['repositories'] = $repositories;
  
          if (count($composerJson['repositories']) === 0) {
              unset($composerJson['repositories']);
          }
  
          $this->saveComposerJson($composerJson);
  
          $this->info('Package was successfully unregistered from composer.json.');
      }
code_tokens: protected function unregisterPackage ( $ vendor , $ package , $ relPackagePath ) { $ this -> info ( 'Unregister package from composer.json.' ) ; $ composerJson = $ this -> loadComposerJson ( ) ; unset ( $ composerJson [ 'require' ] [ "$vendor\\$package\\" ] ) ; $ repositories = array_filter ( $ composerJson [ 'repositories' ] , function ( $ repository ) use ( $ relPackagePath ) { return $ repository [ 'type' ] !== 'path' || $ repository [ 'url' ] !== $ relPackagePath ; } ) ; $ composerJson [ 'repositories' ] = $ repositories ; if ( count ( $ composerJson [ 'repositories' ] ) === 0 ) { unset ( $ composerJson [ 'repositories' ] ) ; } $ this -> saveComposerJson ( $ composerJson ) ; $ this -> info ( 'Package was successfully unregistered from composer.json.' ) ; }
docstring: Unregister package from composer.json.
  
  @param $vendor
  @param $package
  
  @throws FileNotFoundException
  @throws RuntimeException
docstring_tokens: Unregister package from composer . json .