doctrine/orm · error · LogicException

Executor not set yet. Call %s::setSqlExecutor() first.

Error message

Executor not set yet. Call %s::setSqlExecutor() first.

What it means

Error "Executor not set yet. Call %s::setSqlExecutor() first." thrown in doctrine/orm.

Source

Thrown at src/Query/ParserResult.php:106

    }

    /**
     * Gets the SQL executor used by this ParserResult.
     *
     * @deprecated The SqlExecutor will be removed from ParserResult in 4.0. Provide a SqlFinalizer instead that can create the executor.
     */
    public function getSqlExecutor(): AbstractSqlExecutor
    {
        Deprecation::trigger(
            'doctrine/orm',
            'https://github.com/doctrine/orm/pull/11188',
            'The SqlExecutor will be removed from %s in 4.0. Provide a %s instead that can create the executor.',
            self::class,
            SqlFinalizer::class,
        );

        if ($this->sqlExecutor === null) {
            throw new LogicException(sprintf(
                'Executor not set yet. Call %s::setSqlExecutor() first.',
                self::class,
            ));
        }

        return $this->sqlExecutor;
    }

    public function setSqlFinalizer(SqlFinalizer $finalizer): void
    {
        $this->sqlFinalizer = $finalizer;
    }

    public function prepareSqlExecutor(Query $query): AbstractSqlExecutor
    {
        if ($this->sqlFinalizer !== null) {
            return $this->sqlFinalizer->createExecutor($query);
        }

View on GitHub (pinned to d9b9ff7301)

When it happens

Trigger: Thrown at src/Query/ParserResult.php:106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of doctrine/orm@d9b9ff7301 (2026-08-21). Data as JSON: /api/errors/a41e278db1e2095d. Report an issue: GitHub.