Open djidji01 opened 3 years ago
Well, yes, by default Yii::$app
handles one life-cycle. Some things apparently need to be adjusted.
Well, yes, by default
Yii::$app
handles one life-cycle. Some things apparently need to be adjusted.
I meant running only one action during this one life-cycle, which I think is not! sure some thing need to be adjusted.
No, it is one action per life-cycle by default.
I think it was more for the case when the objects are changed during the processing. I'm not sure though.
What steps will reproduce the problem?
I have this controller as application controller:
Then execute:
then
What is the expected result?
$requestedParamsNum === $paramsNum
and$requestedParamsLtr === $paramsLtr
What do you get instead?
$requestedParamsNum === $paramsNum
and$requestedParamsLtr === $requestedParamsNum
Additional info
note that even though
$requestedParamsLtr
and$requestedParamsNum
are obtained after complete execution ofrunAction()
, the issue is the same even during its execution process because , during\Yii::$app
whole lifetime,\Yii::$app->requestedParams
stays attached to the arguments of the very first action executed!!??I would suggest refactoring this for web and this for console also here and here for both , unless
\Yii::$app
is assigned to run only one action during its lifetime!!!