Bootstrap 4, Debug, Yii 2 and Yii 3 progress


(Alexander Makarov) #1
  • Bootstrap 4 and Debug extensions released
  • Yii 2 release next week
  • Yii 3 is moving forward

https://opencollective.com/yiisoft/updates/bootstrap-4-debug-yii-2-and-yii-3-progress


(Manuel Alejandro Gonzalez Prieto) #2

Hello Samdark

after update, i have this error

Serialization of ‘Closure’ is not allowed

in …/micro-service/vendor/opis/closure/functions.php at line 20


(Alexander Makarov) #3

@AlessandroCuba any way I can reproduce the issue?


(Manuel Alejandro Gonzalez Prieto) #4

hello @samdark

Not all the time. For example, I simulated this error in the version of Yii2-debug 2.1.5 and here’s what I get (send by POST)

06:45:32.330	error	yii\base\InvalidArgumentException	yii\base\InvalidArgumentException\impose\configuration\models\Mark not exists in /var/www/myhost/micro-service/modules/yii2-impose-configuration/controllers/MarksController.php:181
Stack trace:
#0 /var/www/gonzalez.de-waisdevweb001.wn.elanders-germany.com/micro-service/modules/yii2-impose-configuration/controllers/MarksController.php(93): impose\configuration\controllers\MarksController->getInstanceModel(NULL)
#1 [internal function]: impose\configuration\controllers\MarksController->actionCreate()
#2 /var/www/myhost/micro-service/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /var/www/myhost/micro-service/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /var/www/myhost/micro-service/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('create', Array)
#5 /var/www/myhost/micro-service/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('impose-config/m...', Array)
#6 /var/www/myhost/micro-service/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#7 /var/www/myhost/micro-service/web/index.php(12): yii\base\Application->run()
#8 {main}

This error with Yii2-debug > 2.1.5 have:

# yii\debug\FlattenException
## Serialization of 'Closure' is not allowed
* 1. in /var/www/myhost/micro-service/vendor/opis/closure/functions.php at line 20

(Stefano Mtangoo) #5

@samdark this is not directly related but I was Wondering if debug uses a format that someone can write a tool to analyze if he is not able to use it. For example few times when System goes live for pre-test we occasionally enable debugger for profiling and use the data to improve the app.

So in current stage can someone enable it and get the data? Is format documented somehere?

In addition to that (now related to the post) can you provide a way to enable debugger without showing app in UI? I mean just let it collect data without user noticing changes to UI? I think adding that option to config will be nice (if am not abusing the module)


(Alexander Makarov) #6

@AlessandroCuba https://github.com/yiisoft/yii2-debug/issues/401


(Alexander Makarov) #7

That’s pretty much not recommended but these *.data files are PHP-serialized data. You can unserialize them to get some arrays. index.data contains list of requests. Serialized as well. Emails are stored separately as mail/*.eml.


(Stefano Mtangoo) #8

What is the recommended way?
Thanks for the tip about being normal PHP arrays. Will it hurt if it get added to the docs?


(Alexander Makarov) #9

Logging or profiling with something light like XHprof.