ZendDeveloperTools module not displaying a toolbar in ZF2 beta5

后端 未结 2 1287
-上瘾入骨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:

    0 讨论(0)
  • 2021-01-19 04:20

    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:

    enter image description here

    0 讨论(0)
提交回复
热议问题