Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Not instantiableyii\di\NotInstantiableException

Failed to instantiate component or class "modules\store_locator\StoreLocator".

$_GET = [
    'store' => 'chouffe',
];
Not instantiable – yii\di\NotInstantiableException
Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Not instantiableyii\di\NotInstantiableException

Failed to instantiate component or class "modules\store_locator\StoreLocator".

$_GET = [
    'store' => 'chouffe',
    'category_key' => 'kleding-accessoires',
];
Not instantiable – yii\di\NotInstantiableException
Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Not instantiableyii\di\NotInstantiableException

Failed to instantiate component or class "modules\store_locator\StoreLocator".

  • 1. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/di/Container.php at line 509
    500501502503504505506507508509510511512513514515516517518
        {
            if (isset($this->_reflections[$class])) {
                return [$this->_reflections[$class], $this->_dependencies[$class]];
            }
     
            $dependencies = [];
            try {
                $reflection = new ReflectionClass($class);
            } catch (\ReflectionException $e) {
                throw new NotInstantiableException(
                    $class,
                    'Failed to instantiate component or class "' . $class . '".',
                    0,
                    $e
                );
            }
     
            $constructor = $reflection->getConstructor();
            if ($constructor !== null) {
    
  • 2. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/di/Container.php at line 385 yii\di\Container::getDependencies()
    379380381382383384385386387388389390391
         * @return object the newly created instance of the specified class
         * @throws NotInstantiableException If resolved to an abstract class or an interface (since 2.0.9)
         */
        protected function build($class, $params, $config)
        {
            /* @var $reflection ReflectionClass */
            list($reflection, $dependencies) = $this->getDependencies($class);
     
            $addDependencies = [];
            if (isset($config['__construct()'])) {
                $addDependencies = $config['__construct()'];
                unset($config['__construct()']);
            }
    
  • 3. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/di/Container.php at line 170 yii\di\Container::build()
    164165166167168169170171172173174175176
                $class = $class->id;
            }
            if (isset($this->_singletons[$class])) {
                // singleton
                return $this->_singletons[$class];
            } elseif (!isset($this->_definitions[$class])) {
                return $this->build($class, $params, $config);
            }
     
            $definition = $this->_definitions[$class];
     
            if (is_callable($definition, true)) {
                $params = $this->resolveDependencies($this->mergeParams($class, $params));
    
  • 4. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/BaseYii.php at line 345 yii\di\Container::get()
    339340341342343344345346347348349350351
         * @throws InvalidConfigException if the configuration is invalid.
         * @see \yii\di\Container
         */
        public static function createObject($type, array $params = [])
        {
            if (is_string($type)) {
                return static::$container->get($type, $params);
            }
     
            if (is_callable($type, true)) {
                return static::$container->invoke($type, $params);
            }
     
    
  • 5. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/base/Module.php at line 445 yii\BaseYii::createObject()
    439440441442443444445446447448449450451
            if (isset($this->_modules[$id])) {
                if ($this->_modules[$id] instanceof self) {
                    return $this->_modules[$id];
                } elseif ($load) {
                    Yii::debug("Loading module: $id", __METHOD__);
                    /* @var $module Module */
                    $module = Yii::createObject($this->_modules[$id], [$id, $this]);
                    $module::setInstance($module);
                    return $this->_modules[$id] = $module;
                }
            }
     
            return null;
    
  • 6. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/base/Application.php at line 313 yii\base\Module::getModule()
    307308309310311312313314315316317318319
                        continue;
                    }
                } elseif (is_string($mixed)) {
                    if ($this->has($mixed)) {
                        $component = $this->get($mixed);
                    } elseif ($this->hasModule($mixed)) {
                        $component = $this->getModule($mixed);
                    } elseif (strpos($mixed, '\\') === false) {
                        throw new InvalidConfigException("Unknown bootstrapping component ID: $mixed");
                    }
                }
     
                if (!isset($component)) {
    
  • 7. in /data/web/builds-craft-staging/releases/132/vendor/craftcms/cms/src/web/Application.php at line 127 yii\base\Application::bootstrap()
    121122123124125126127128129130131132133
            if (!$this->has('request', true)) {
                $this->getRequest();
            }
     
            // Skip yii\web\Application::bootstrap, because we've already set @web and
            // @webroot from craft\web\Request::init(), and we like our values better.
            \yii\base\Application::bootstrap();
        }
     
        /**
         * @inheritdoc
         */
        public function setTimeZone($value): void
    
  • 8. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/base/Application.php at line 271 – craft\web\Application::bootstrap()
    265266267268269270271272273274275276277
        /**
         * {@inheritdoc}
         */
        public function init()
        {
            $this->state = self::STATE_INIT;
            $this->bootstrap();
        }
     
        /**
         * Initializes extensions and executes bootstrap components.
         * This method is called by [[init()]] after the application has been fully configured.
         * If you override this method, make sure you also call the parent implementation.
    
  • 9. in /data/web/builds-craft-staging/releases/132/vendor/craftcms/cms/src/web/Application.php at line 104 yii\base\Application::init()
    9899100101102103104105106107108109110
         */
        public function init(): void
        {
            $this->state = self::STATE_INIT;
            $this->_preInit();
     
            parent::init();
     
            if (!App::isEphemeral()) {
                $this->ensureResourcePathExists();
            }
     
            $this->_postInit();
    
  • 10. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/base/BaseObject.php at line 109 – craft\web\Application::init()
    103104105106107108109110111112113114115
         */
        public function __construct($config = [])
        {
            if (!empty($config)) {
                Yii::configure($this, $config);
            }
            $this->init();
        }
     
        /**
         * Initializes the object.
         * This method is invoked at the end of the constructor after the object is initialized with the
         * given configuration.
    
  • 11. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/base/Application.php at line 204 yii\base\BaseObject::__construct()
    198199200201202203204205206207208209210
            $this->state = self::STATE_BEGIN;
     
            $this->preInit($config);
     
            $this->registerErrorHandler($config);
     
            Component::__construct($config);
        }
     
        /**
         * Pre-initializes the application.
         * This method is called at the beginning of the application constructor.
         * It initializes several important application properties.
    
  • 13. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/di/Container.php at line 419 – ReflectionClass::newInstanceArgs()
    413414415416417418419420421422423424425
     
            $config = $this->resolveDependencies($config);
     
            if (!empty($dependencies) && $reflection->implementsInterface('yii\base\Configurable')) {
                // set $config as the last parameter (existing one will be overwritten)
                $dependencies[count($dependencies) - 1] = $config;
                return $reflection->newInstanceArgs($dependencies);
            }
     
            $object = $reflection->newInstanceArgs($dependencies);
            foreach ($config as $name => $value) {
                $object->$name = $value;
            }
    
  • 14. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/di/Container.php at line 170 yii\di\Container::build()
    164165166167168169170171172173174175176
                $class = $class->id;
            }
            if (isset($this->_singletons[$class])) {
                // singleton
                return $this->_singletons[$class];
            } elseif (!isset($this->_definitions[$class])) {
                return $this->build($class, $params, $config);
            }
     
            $definition = $this->_definitions[$class];
     
            if (is_callable($definition, true)) {
                $params = $this->resolveDependencies($this->mergeParams($class, $params));
    
  • 15. in /data/web/builds-craft-staging/releases/132/vendor/yiisoft/yii2/BaseYii.php at line 365 yii\di\Container::get()
    359360361362363364365366367368369370371
                return static::$container->get($class, $params, $type);
            }
     
            if (isset($type['class'])) {
                $class = $type['class'];
                unset($type['class']);
                return static::$container->get($class, $params, $type);
            }
     
            throw new InvalidConfigException('Object configuration must be an array containing a "class" or "__class" element.');
        }
     
        private static $_logger;
    
  • 16. in /data/web/builds-craft-staging/releases/132/vendor/craftcms/cms/src/Craft.php at line 71 yii\BaseYii::createObject()
    65666768697071727374757677
        public static function createObject($type, array $params = [])
        {
            if (is_array($type) && isset($type['__class']) && isset($type['class'])) {
                throw new InvalidConfigException('`__class` and `class` cannot both be specified.');
            }
     
            return parent::createObject($type, $params);
        }
     
        /**
         * Checks if a string references an environment variable (`$VARIABLE_NAME`)
         * and/or an alias (`@aliasName`), and returns the referenced value.
         *
    
  • 17. in /data/web/builds-craft-staging/releases/132/vendor/craftcms/cms/bootstrap/bootstrap.php at line 343 – Craft::createObject()
    337338339340341342343344345346347348349
    if (function_exists('craft_modify_app_config')) {
        craft_modify_app_config($config, $appType);
    }
     
    // Initialize the application
    /** @var \craft\web\Application|craft\console\Application $app */
    $app = Craft::createObject($config);
     
    // If there was a max_input_vars error, kill the request before we start processing it with incomplete data
    if ($lastError && strpos($lastError['message'], 'max_input_vars') !== false) {
        throw new ErrorException($lastError['message']);
    }
     
    
  • 18. in /data/web/builds-craft-staging/releases/132/vendor/craftcms/cms/bootstrap/web.php at line 40 – require('/data/web/builds-craft-staging/r...')
    34353637383940
     
    // Load Craft
    // -----------------------------------------------------------------------------
     
    $appType = 'web';
     
    return require __DIR__ . '/bootstrap.php';
    
  • 19. in /data/web/builds-craft-staging/releases/132/web/index.php at line 114 – require('/data/web/builds-craft-staging/r...')
    108109110111112113114115
    // End custom edit
     
    // Load and run Craft
    define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
    determineCraftSite();
     
    $app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php';
    $app->run();
    
$_GET = [
    'id' => '',
];
Not instantiable – yii\di\NotInstantiableException
Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Not instantiableyii\di\NotInstantiableException

Failed to instantiate component or class "modules\store_locator\StoreLocator".

$_GET = [
    'store' => 'chouffe',
];