first of all my code works correctly
then I finish another task and I push
then make a pull and resolve conflicts
after that I intercepted this error error messsage
this is my composer.json code
"minimum-stability": "stable",
"require": {
"php": ">=7.3.0",
"ext-json": "*",
"yiisoft/yii2": "~2.0.23",
"yiisoft/yii2-bootstrap4": "~2.0.6",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0",
"yiisoft/yii2-debug": "^2.1",
"yiisoft/yii2-redis": "^2.0",
"yiisoft/yii2-imagine": "^2.2",
"bigbluebutton/bigbluebutton-api-php": "~2.0.0",
"mobiledetect/mobiledetectlib": "^2.8"
},
this is my controller
use Mobile_Detect;
trait WithMeetingTrait
{
protected function getMeetingId($model)
{
/**
* @var $model Seminar
*/
return mb_strtoupper(substr($model::className(), 0, 3)) . '-' . $model->id;
}
protected function allowedToCreate()
{
// TRUE if super admin or $this->userIsModelOwner();
}
/**
* @param $link
* @return mixed
* @throws InvalidConfigException
* @throws NotInstantiableException
*/
public function actionStart($link)
{
/**
* @var $model Seminar
*/
$model = $this->findModelByColumn('link', $link);
// TODO only super admin or the room teacher can create the room if allowedToCreate()
$meeting = $this->getWebConference();
$response = $meeting->create(
$this->getMeetingId($model),
$model->name,
Url::to(['seminar/join', 'link' => $model->link], true),
['ownerType' => $model::className(), 'ownerId' => $model->id]
);
$detect = new Mobile_Detect;
$settings = Settings::find()->where(['setting_name' => Settings::DEVICE_TYPE])->one();
if ($settings->value === 'Yes') {
if ($detect->isMobile()) {
$icon = ' ⬛';
} elseif ($detect->isTablet()) {
$icon = ' 📱';
} else {
$icon = ' 💻';
}
} else {
$icon = '';
}
I use this service from packagist mobile detect
I need help please
2
Answers
Check the namespace of the mobile detect script.
I can include the script with
I got that error when do composer update version. The reason is big changing in namespace. So, you can use old version, or change the namespace:
Check origin reference here.