Open
Description
After enabling extension to the user class its broken:
'user' => [
'class' => 'lucidprogrammer\simplesamlphp\SamlUser',
I get the following error:
ReflectionException: Class samlsettings does not exist in /app/basic/vendor/yiisoft/yii2/di/Container.php:428
Stack trace:
#0 /app/basic/vendor/yiisoft/yii2/di/Container.php(428): ReflectionClass->__construct('samlsettings')
* @return array the dependencies of the specified class.
*/
protected function getDependencies($class)
{
if (isset($this->_reflections[$class])) {
return [$this->_reflections[$class], $this->_dependencies[$class]];
}
$dependencies = [];
-----> $reflection = new ReflectionClass($class);
$constructor = $reflection->getConstructor();
if ($constructor !== null) {
foreach ($constructor->getParameters() as $param) {
if (version_compare(PHP_VERSION, '5.6.0', '>=') && $param->isVariadic()) {
break;
} elseif ($param->isDefaultValueAvailable()) {
$dependencies[] = $param->getDefaultValue();
} else {
#1 /app/basic/vendor/yiisoft/yii2/di/Container.php(364): yii\di\Container->getDependencies('samlsettings')
#2 /app/basic/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('samlsettings', Array, Array)
#3 /app/basic/vendor/lucidprogrammer/yii2-simplesamlphp/src/SamlUser.php(31): yii\di\Container->get('samlsettings')
if(array_key_exists('idAttribute', $attributes)){
$idAttribute = $attributes['idAttribute'];
$mappings = (new ArrayObject($attributes))->getArrayCopy();
unset($mappings['idAttribute']);
$mappings = array_values($mappings);
}
-----> Yii::$container->get('samlsettings')->idAttribute = $idAttribute;
Yii::$container->get('samlsettings')->mappings = $mappings;
parent::__construct();
}
/**
* changing the loginUrl and identityClass
#4 [internal function]: lucidprogrammer\simplesamlphp\SamlUser->__construct(Array)
#5 /app/basic/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#6 /app/basic/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('lucidprogrammer...', Array, Array)
#7 /app/basic/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('lucidprogrammer...', Array, Array)
#8 /app/basic/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#9 /app/basic/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('user', false)
#10 /app/basic/vendor/yiisoft/yii2-debug/panels/UserPanel.php(109): yii\base\Module->get('user', false)
#11 /app/basic/vendor/yiisoft/yii2-debug/panels/UserPanel.php(296): yii\debug\panels\UserPanel->getUser()
#12 /app/basic/vendor/yiisoft/yii2-debug/panels/UserPanel.php(80): yii\debug\panels\UserPanel->isEnabled()
#13 /app/basic/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\debug\panels\UserPanel->init()
#14 [internal function]: yii\base\BaseObject->__construct(Array)
#15 /app/basic/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#16 /app/basic/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('yii\\debug\\panel...', Array, Array)
#17 /app/basic/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('yii\\debug\\panel...', Array, Array)
#18 /app/basic/vendor/yiisoft/yii2-debug/Module.php(177): yii\BaseYii::createObject(Array)
#19 /app/basic/vendor/yiisoft/yii2-debug/Module.php(149): yii\debug\Module->initPanels()
#20 /app/basic/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\debug\Module->init()
#21 /app/basic/vendor/yiisoft/yii2/base/Module.php(158): yii\base\BaseObject->__construct(Array)
#22 [internal function]: yii\base\Module->__construct('debug', Object(yii\web\Application), Array)
#23 /app/basic/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#24 /app/basic/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('yii\\debug\\Modul...', Array, Array)
#25 /app/basic/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('yii\\debug\\Modul...', Array, Array)
#26 /app/basic/vendor/yiisoft/yii2/base/Module.php(427): yii\BaseYii::createObject(Array, Array)
#27 /app/basic/vendor/yiisoft/yii2/base/Application.php(315): yii\base\Module->getModule('debug')
#28 /app/basic/vendor/yiisoft/yii2/web/Application.php(69): yii\base\Application->bootstrap()
#29 /app/basic/vendor/yiisoft/yii2/base/Application.php(273): yii\web\Application->bootstrap()
#30 /app/basic/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\base\Application->init()
#31 /app/basic/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#32 /app/basic/web/index.php(12): yii\base\Application->__construct(Array)
#33 {main}
So what am i missing here?
yii2 Version: 2.0.15.1
php 7.2.8
Metadata
Metadata
Assignees
Labels
No labels