ZendDeveloperTools module not displaying a toolbar in ZF2 beta5

情到浓时终转凉″ 提交于 2019-12-01 17:47:19

It was a stupid mistake, I had placed zenddevelopertools.local.php into ./config and not ./config/autoload. Above instructions are correct. Here is what the toolbar looks like for those who are curious:

dualmon

Worked for me, but one change I had to make for my app was rename the config from:

zenddevelopertools.local.php

to:

zenddevelopertools.local.config.php

Also, I installed BjyProfiler, which "just worked" with my Doctrine2 setup (nice!). The only caveat was that I had to add the default SM factory config so it would stop throwing errors:

'service_manager' => array(
    'factories' => array(
        /**
         * This default Db factory is required so that ZDT 
         * doesn't throw exceptions, even though we don't use it
         */
        'Zend\Db\Adapter\Adapter' => function ($sm) use ($dbParams) {
            $adapter = new BjyProfiler\Db\Adapter\ProfilingAdapter(array(
                'driver'    => 'pdo',
                'dsn'       => 'mysql:dbname=skunk;host=hunk',
                'database'  => 'bunk',
                'username'  => 'junk',
                'password'  => 'punk',
                'hostname'  => 'lunk',
            ));

            $adapter->setProfiler(new BjyProfiler\Db\Profiler\Profiler);
            $adapter->injectProfilingStatementPrototype();
            return $adapter;
        },
    ),
),

See the screenshot:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!