public function setStage($stage)
    {
        $connectionKey = $this->getCurrentConnectionKey();
        if ($stage === $connectionKey->stage) {
            return;
        }

        $connectionKey->stage = $stage;
        $this->getConnections()->map(function (ConnectionInterface $connection) use ($connectionKey) {
            if ($connection->isCurrent() || $connection->getConnectionKey()->is($connectionKey)) {
                $connection->setConnectionKey($connectionKey);
            }

            return $connection;
        });

        // If we do have a stage, cleanup previous events
        if ($stage) {
            $this->bootstrapper->bootstrapUserCode();
        }
    }