Posts Tagged with parser

Displaying 1-2 of 2 results.
Resolved: Yii 2.0.12.2 advanced ./yii(php yii) console throw error Exception yii\base\UnknownPropertyException
posted by admin on October 13, 2018
Yii2 advanced
common main.php config

<?php

return [
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'i18n' => [
'translations' => [
'app*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@common/messages',
],
'app*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@common/messages',
],
],
],
'assetManager' => [
'appendTimestamp' => true,
'linkAssets' => true,
],
'request' => [
//'enableCookieValidation' => true,
//'enableCsrfValidation' => true,
'parsers' => [
'application/json' => 'yii\web\JsonParser',
]
],
],
'on beforeAction' => function ($event) {
//to do
},
];

command line comand in yii2 project directory

arthur@smart:/var/www/smartsuccess/html$ php yii


Throw error

Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: yii\console\Request::parsers'

in /var/www/smartsuccess/html/vendor/yiisoft/yii2/base/Component.php:201

Stack trace:
#0 /var/www/smartsuccess/html/vendor/yiisoft/yii2/BaseYii.php(529): yii\base\Component->__set('parsers', Array)
#1 /var/www/smartsuccess/html/vendor/yiisoft/yii2/base/Object.php(105): yii\BaseYii::configure(Object(yii\console\Request), Array)
#2 [internal function]: yii\base\Object->__construct(Array)
#3 /var/www/smartsuccess/html/vendor/yiisoft/yii2/di/Container.php(381): ReflectionClass->newInstanceArgs(Array)
#4 /var/www/smartsuccess/html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('yii\\console\\Req...', Array, Array)
#5 /var/www/smartsuccess/html/vendor/yiisoft/yii2/BaseYii.php(348): yii\di\Container->get('yii\\console\\Req...', Array, Array)
#6 /var/www/smartsuccess/html/vendor/yiisoft/yii2/di/ServiceLocator.php(135): yii\BaseYii::createObject(Array)
#7 /var/www/smartsuccess/html/vendor/yiisoft/yii2/console/Application.php(219): yii\di\ServiceLocator->get('request')
#8 /var/www/smartsuccess/html/vendor/yiisoft/yii2/base/Application.php(380): yii\console\Application->getRequest()
#9 /var/www/smartsuccess/html/yii(27): yii\base\Application->run()
#10 {main}

Read more
Resolved: markItUp. BBCode Parser with emotions smiles
posted by admin on December 25, 2015
altI want to convert convert markItUp BBCode to HTML tags.
I have smiles too.Read more