Zend Tool bug and work around

zf I have fired off the new Zend Framework tool several times now to automatically create a scaffolding for a new project. It’s pretty handy, though for a lot less work they could have just included a premade scaffolding in the download. The Zend Tool is fairly new and evolving, and will only get stronger as time goes by and as more options become available, I’m sure a generic one-size-fits-all scaffolding will no longer suffice, so having a flexible tool is the way to go in the long run.

I ran into a curious thing when I installed Zend Framework on my new Mac: The Zend Tool failed with a bizarre error thusly:

PHP Fatal error: Uncaught exception 'Zend_Tool_Framework_Manifest_Exception' with message 'A provider provided by the Zend_Tool_Framework_Manifest_ManifestBadProvider does not implement Zend_Tool_Framework_Provider_Interface' in /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Manifest/Repository.php:100
Stack trace:
#0 /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Loader/Abstract.php(104): Zend_Tool_Framework_Manifest_Repository->addManifest(Object(Zend_Tool_Framework_Manifest_M anifestBadProvider))
#1 /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Client/Abstract.php(101): Zend_Tool_Framework_Loader_Abstract->load()
#2 /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Client/Abstract.php(192): Zend_Tool_Framework_Client_Abstract->initialize()
#3 /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Client/Console.php(86): Zend_Tool_Framework_Client_Abstract->dispatch()
#4 /usr/local/PEAR/ZendFramework-1.8.3/bin/zf.php(77): Zend_Tool_Framework_Client_Co in /usr/local/PEAR/ZendFramework-1.8.3/library/Zend/Tool/Framework/Manifest/Repository.php on line 100

Not wishing to crawl the entire code I posted this on the zf forums, where no one apparently knew the answer. However, googling some of the specific error messages dropped me into the Zend Issue tracker. It would be a good idea for everyone who uses Zend Framework to sign up for a membership in this site. Apparently it is not integrated with the Zend overall site or the forums. I would not have looked in the Issue tracker because I was not sure whether it was a bug or just an error on my part on setting it up.

I copied the scripts to /usr/bin as suggested first, but that didn’t work. Then I saw the message from the developer that states that somehow it’s sucking in something it shouldn’t be from the unit tests directory. That should not be happening, as using the Zend Tool is not really supposed to be a testing task. They didn’t really say, and I don’t know, why it manifests with this problem on some setups and not on others. My guess would be someone failed to exclude the tests directory from some global reflection or something. I finally got it to work by just moving the tests directory out of there altogether. I can always move it back if I really want to run the unit tests on Zend Framework. To be honest I am much more interested in the results of the unit tests of my application.

4 comments to Zend Tool bug and work around

  • I had a great experience with Zend. Especialy seeing how it’s still in developmente. I’m really looking forward to updates.

  • elton

    Your deduction that this is caused by some global reflection is pretty close.

    This issue surfaces on systems which have an include_path set that encompasses the whole Zend Framework distribution, including unit tests. If you remove that global include path, on Ubuntu it defaults to /usr/share/php, and put instead a path to Zend’s library directory (/usr/share/php/zendframework/library) you avoid the inclusion of the unit tests and things should work.

    No need to actually remove the unit tests 🙂 Hope this helps someone find the answer more easily than I did.

  • I hope you never stop!

    This is one of the best articles Ive ever read. Youve got some mad skill here, man. I just hope that you dont lose your style because youre definitely one of the coolest bloggers out there. Please keep it up because the internet needs someone like you spreading the word.

    Btw I dont know why nobody is blogging about this free electronic cigarette giveaway youtube vid? It’s New years and the amount of peepswho are quitting cigarettes is huge. I would imagine electronic cigarettes and quitting smoking will be a hugely googled statement for next few weeks.

    It is a bit out of the blue but traffic is traffic and everyone likes free stuff.

    I really need to run a blog!

    Lots of bloglove
    Chanyx

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.