Yii team released new extension. As the name says, it's an interactive shell based on psysh. After installing the package via requiring
yiisoft/yii2-shell composer package you can start it via
The list of features is available at psysh website. Additionally you can access the application object using
Yii::$app. All other classes are available as well.