phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\ManagerOrmServicesUnavailable

A dependency injection container is required to access the s

Error message

A dependency injection container is required to access the services related to the ORM

What it means

Error "A dependency injection container is required to access the services related to the ORM" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Manager.zep:837

     */
    public function clearReusableObjects() -> void
    {
        let this->reusable = [];
    }

    /**
     * Creates a Phalcon\Mvc\Model\Query\Builder
     *
     * @param array|string|null params
     */
    public function createBuilder(var params = null) -> <BuilderInterface>
    {
        var container;

        let container = <DiInterface> this->container;

        if unlikely typeof container != "object" {
            throw new ManagerOrmServicesUnavailable();
        }

        /**
         * Gets Builder instance from DI container
         */
        let this->builder = <BuilderInterface> container->get(
            Builder::class,
            [
                params,
                container
            ]
        );

        return this->builder;
    }

    /**
     * Creates a Phalcon\Mvc\Model\Query without execute it

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Manager.zep:837 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/9d4e48771207b10e. Report an issue: GitHub.