original_string: public function discardUpperMigrations(Bundle $bundle)
      {
          $drivers = array_keys($this->getAvailablePlatforms());
          $currentVersion = $this->migrator->getCurrentVersion($bundle);
          $this->log("Deleting migration classes above version {$currentVersion} for '{$bundle->getName()}'...");
          $hasDeleted = false;
  
          foreach ($drivers as $driver) {
              $deletedVersions = $this->writer->deleteUpperMigrationClasses($bundle, $driver, $currentVersion);
  
              if (count($deletedVersions) > 0) {
                  $hasDeleted = true;
  
                  foreach ($deletedVersions as $version) {
                      $this->log(" - Deleted {$version} for driver {$driver}");
                  }
              }
          }
  
          if (!$hasDeleted) {
              $this->log('Nothing to discard: there are no migrations classes above the current version');
          }
      }
code: public function discardUpperMigrations(Bundle $bundle)
      {
          $drivers = array_keys($this->getAvailablePlatforms());
          $currentVersion = $this->migrator->getCurrentVersion($bundle);
          $this->log("Deleting migration classes above version {$currentVersion} for '{$bundle->getName()}'...");
          $hasDeleted = false;
  
          foreach ($drivers as $driver) {
              $deletedVersions = $this->writer->deleteUpperMigrationClasses($bundle, $driver, $currentVersion);
  
              if (count($deletedVersions) > 0) {
                  $hasDeleted = true;
  
                  foreach ($deletedVersions as $version) {
                      $this->log(" - Deleted {$version} for driver {$driver}");
                  }
              }
          }
  
          if (!$hasDeleted) {
              $this->log('Nothing to discard: there are no migrations classes above the current version');
          }
      }
code_tokens: public function discardUpperMigrations ( Bundle $ bundle ) { $ drivers = array_keys ( $ this -> getAvailablePlatforms ( ) ) ; $ currentVersion = $ this -> migrator -> getCurrentVersion ( $ bundle ) ; $ this -> log ( "Deleting migration classes above version {$currentVersion} for '{$bundle->getName()}'..." ) ; $ hasDeleted = false ; foreach ( $ drivers as $ driver ) { $ deletedVersions = $ this -> writer -> deleteUpperMigrationClasses ( $ bundle , $ driver , $ currentVersion ) ; if ( count ( $ deletedVersions ) > 0 ) { $ hasDeleted = true ; foreach ( $ deletedVersions as $ version ) { $ this -> log ( " - Deleted {$version} for driver {$driver}" ) ; } } } if ( ! $ hasDeleted ) { $ this -> log ( 'Nothing to discard: there are no migrations classes above the current version' ) ; } }
docstring: Deletes migration classes which are above the current version of a bundle.
  
  @param \Symfony\Component\HttpKernel\Bundle\Bundle $bundle
docstring_tokens: Deletes migration classes which are above the current version of a bundle .