src/Phinx/Migration/Manager.php
public function toggleBreakpoint($environment, $version)
    {
        $migrations = $this->getMigrations($environment);
        $this->getMigrations($environment);
        $env = $this->getEnvironment($environment);
        $versions = $env->getVersionLog();

        if (empty($versions) || empty($migrations)) {
            return;
        }

        if ($version === null) {
            $lastVersion = end($versions);
            $version = $lastVersion['version'];
        }

        if (0 != $version && !isset($migrations[$version])) {
            $this->output->writeln(sprintf(
                '<comment>warning</comment> %s is not a valid version',
                $version
            ));

            return;
        }

        $env->getAdapter()->toggleBreakpoint($migrations[$version]);

        $versions = $env->getVersionLog();

        $this->getOutput()->writeln(
            ' Breakpoint ' . ($versions[$version]['breakpoint'] ? 'set' : 'cleared') .
            ' for <info>' . $version . '</info>' .
            ' <comment>' . $migrations[$version]->getName() . '</comment>'
        );
    }
public function toggleBreakpoint($environment, $version)
    {
        $migrations = $this->getMigrations($environment);
        $this->getMigrations($environment);
        $env = $this->getEnvironment($environment);
        $versions = $env->getVersionLog();

        if (empty($versions) || empty($migrations)) {
            return;
        }

        if ($version === null) {
            $lastVersion = end($versions);
            $version = $lastVersion['version'];
        }

        if (0 != $version && !isset($migrations[$version])) {
            $this->output->writeln(sprintf(
                '<comment>warning</comment> %s is not a valid version',
                $version
            ));

            return;
        }

        $env->getAdapter()->toggleBreakpoint($migrations[$version]);

        $versions = $env->getVersionLog();

        $this->getOutput()->writeln(
            ' Breakpoint ' . ($versions[$version]['breakpoint'] ? 'set' : 'cleared') .
            ' for <info>' . $version . '</info>' .
            ' <comment>' . $migrations[$version]->getName() . '</comment>'
        );
    }
public function toggleBreakpoint ( $ environment , $ version ) { $ migrations = $ this -> getMigrations ( $ environment ) ; $ this -> getMigrations ( $ environment ) ; $ env = $ this -> getEnvironment ( $ environment ) ; $ versions = $ env -> getVersionLog ( ) ; if ( empty ( $ versions ) || empty ( $ migrations ) ) { return ; } if ( $ version === null ) { $ lastVersion = end ( $ versions ) ; $ version = $ lastVersion [ 'version' ] ; } if ( 0 != $ version && ! isset ( $ migrations [ $ version ] ) ) { $ this -> output -> writeln ( sprintf ( '<comment>warning</comment> %s is not a valid version' , $ version ) ) ; return ; } $ env -> getAdapter ( ) -> toggleBreakpoint ( $ migrations [ $ version ] ) ; $ versions = $ env -> getVersionLog ( ) ; $ this -> getOutput ( ) -> writeln ( ' Breakpoint ' . ( $ versions [ $ version ] [ 'breakpoint' ] ? 'set' : 'cleared' ) . ' for <info>' . $ version . '</info>' . ' <comment>' . $ migrations [ $ version ] -> getName ( ) . '</comment>' ) ; }
Toggles the breakpoint for a specific version.

@param string $environment
@param int|null $version
@return void
Toggles the breakpoint for a specific version .