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.