ZendDeveloperTools module not displaying a toolbar in ZF2 beta5

后端 未结 2 1286
-上瘾入骨i
-上瘾入骨i 2021-01-19 03:23

I\'m trying to install the ZendDeveloperTools modules for ZF2 beta5. Here are the steps I followed so far:

-Successfully installed ZendSkeletonApplicati

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-19 04:02

    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:

提交回复
热议问题