src/AbstractEngine.php
public function pushCommand(CommandInterface $command)
    {
        $this->storeCommand($command);
        
        if ($this->executionDepth == 0) {
            try {
                // Execute remaining commands when this is a top level execution.
                $this->performExecution(function () {
                    
                    while (!empty($this->commands)) {
                        $cmd = array_shift($this->commands);
                        
                        $this->commandResults[$cmd] = $cmd->execute($this);
                        $this->executionCount++;
                    }
                });
            } finally {
                // Free command result memory after top level execution.
                $this->commandResults = new \SplObjectStorage();
            }
        }
    }
public function pushCommand(CommandInterface $command)
    {
        $this->storeCommand($command);
        
        if ($this->executionDepth == 0) {
            try {
                // Execute remaining commands when this is a top level execution.
                $this->performExecution(function () {
                    
                    while (!empty($this->commands)) {
                        $cmd = array_shift($this->commands);
                        
                        $this->commandResults[$cmd] = $cmd->execute($this);
                        $this->executionCount++;
                    }
                });
            } finally {
                // Free command result memory after top level execution.
                $this->commandResults = new \SplObjectStorage();
            }
        }
    }
{@inheritdoc}