src/VagrantTransient.php
protected function migrateEnvironments($oldStore)
    {
        $currentStore = $this->getFileName();   //As a local cache
        if (false == file_exists($oldStore)) {
            $this->printLn("Old store not found at {$oldStore}", 'error');
        } else {
            $this->printLn("Old store found {$oldStore}");
        }
        $this->setFileName($oldStore);
        $this->loadEnvironments();
        $this->printLn("Old environments loaded");
        $oldEnvironments = $this->getEnvironments();
        $this->setFileName($currentStore);
        $this->loadEnvironments();
        foreach ($oldEnvironments as $oldEnvironment) {
            /*
             * Doing it this way validates the environment exists
             * before adding them to the store
             */
            $this->createEnvironment($oldEnvironment);
        }
        $this->save();
        $this->printLn("Old environments appended onto current store");
        $this->getEnvironments();
    }
protected function migrateEnvironments($oldStore)
    {
        $currentStore = $this->getFileName();   //As a local cache
        if (false == file_exists($oldStore)) {
            $this->printLn("Old store not found at {$oldStore}", 'error');
        } else {
            $this->printLn("Old store found {$oldStore}");
        }
        $this->setFileName($oldStore);
        $this->loadEnvironments();
        $this->printLn("Old environments loaded");
        $oldEnvironments = $this->getEnvironments();
        $this->setFileName($currentStore);
        $this->loadEnvironments();
        foreach ($oldEnvironments as $oldEnvironment) {
            /*
             * Doing it this way validates the environment exists
             * before adding them to the store
             */
            $this->createEnvironment($oldEnvironment);
        }
        $this->save();
        $this->printLn("Old environments appended onto current store");
        $this->getEnvironments();
    }
protected function migrateEnvironments ( $ oldStore ) { $ currentStore = $ this -> getFileName ( ) ; //As a local cache if ( false == file_exists ( $ oldStore ) ) { $ this -> printLn ( "Old store not found at {$oldStore}" , 'error' ) ; } else { $ this -> printLn ( "Old store found {$oldStore}" ) ; } $ this -> setFileName ( $ oldStore ) ; $ this -> loadEnvironments ( ) ; $ this -> printLn ( "Old environments loaded" ) ; $ oldEnvironments = $ this -> getEnvironments ( ) ; $ this -> setFileName ( $ currentStore ) ; $ this -> loadEnvironments ( ) ; foreach ( $ oldEnvironments as $ oldEnvironment ) { /*
             * Doing it this way validates the environment exists
             * before adding them to the store
             */ $ this -> createEnvironment ( $ oldEnvironment ) ; } $ this -> save ( ) ; $ this -> printLn ( "Old environments appended onto current store" ) ; $ this -> getEnvironments ( ) ; }
This method migrates an old store to a new store.
It does however validate that the environment is valid
before adding it to the store.

@param string $oldStore Is the path to the old store

@return array of new environments
This method migrates an old store to a new store . It does however validate that the environment is valid before adding it to the store .