Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is .zfproject.xml a must in a Zend Framework project?

  1. Is .zfproject.xml a must in a Zend Framework project?
  2. What does it do?
  3. Is it's location absolute?
like image 228
Winston Chen Avatar asked Mar 30 '10 09:03

Winston Chen


4 Answers

When using Zend_Tool to manage your Zend Framework project, .zfproject.xml will contain your application structure state. This is required by Zend_Tool (and only by it) to be able to work, e.g. add code to certain parts., generate things, etc.

Quoting ZF Manual on Zend_Tool_Project:

So, for example, if in one command you created a controller, and in the next command you wish to create an action within that controller, Zend_Tool_Project is gonna have to know about the controller file you created so that you can (in the next action), be able to append that action to it.

I am not sure if Zend_Tool can be configured to use a different path to .zfproject.xml. My suggestion would be to leave it untouched. It's a hidden file anyway.

like image 180
Gordon Avatar answered Nov 20 '22 06:11

Gordon


Just to add, the zfproject.xml is not needed if you don't use Zend_Tool.

So it's not a must. Personally, I manage all my zf projects more or less without a command line and it works fine for me.

like image 6
Richard Knop Avatar answered Nov 20 '22 07:11

Richard Knop


Basically if your going to use Zend_Tool, stick with it. Zend Tool doesn't like it when you create MVC manually. Its just another layer of abstraction that you can probably live without.

like image 4
Bodman Avatar answered Nov 20 '22 08:11

Bodman


I am using zend framework 1.10. Whenever I create a action using zf tool it re-indents the code in the controller file and removes some function closing brackets. It is kind of buggy, so will not be using it from now on.

like image 1
Andy N Avatar answered Nov 20 '22 06:11

Andy N