neeckeloo / NewRelic

NewRelic module for Laminas
MIT License
33 stars 13 forks source link

Bugfix for accessing non-existant getControllerName() and getActionName() methods #7

Closed al3xdm closed 10 years ago

al3xdm commented 10 years ago

After fixing the other problem, I then hit this:

PHP Fatal error: Call to undefined method Zend\Http\PhpEnvironment\Request::getControllerName() in /var/www/hobzy-findandcraft_com-3eca1a6822f7/vendor/neeckeloo/newrelic/src/NewRelic/Listener/AbstractTransactionListener.php on line 42

There isn't a getControllerName() or getActionName() in https://github.com/zendframework/zf2/blob/master/library/Zend/Http/PhpEnvironment/Request.php so I presume you meant to fetch the variables from the routematch variable that's set earlier.

This commit fixes that, however I then hit another fatal:

PHP Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for NewRelic\ModuleOptions'

After fixing that I got another fatal, I can't put more time towards fixing things at the moment so I'm downgrading to the 1.0.1 release for a while.

neeckeloo commented 10 years ago

I fixed problem retreiving NewRelic\ModuleOptions service.

al3xdm commented 10 years ago

Thanks for fixing that, just tested it quickly and now doesn't seem to be throwing fatals anymore.

I'll help out with adding some tests early next week if you like? Finding this Module really useful so thanks!

neeckeloo commented 10 years ago

Your proposals and unit tests to improve the module are welcome.