ZF-11466: Zend_Tool_Project_Provider_Controller checks for existing controller before canonicalizing name
Description
When creating controllers with:
{{zf create action}}
we can sometimes override existing controller (without any warning).
To override controller {{LoremController.php}} type the command:
{{zf create controller lorem}}
or
{{zf create controller}}
and then when prompted type:
{{lorem}}
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2011-06-14T00:09:11.000+0000
The issue here is that it appears
zf create controllerchecks to see if the controller exists before it's converted to canonical form.Reproduced below against trunk:
zf create controller Testrun twice will trigger an error the second time, but runningzf create controller testsubsequent to that will overwrite the existing TestController, despite the fact that all three reference the same controller.Posted by Adam Lundrigan (adamlundrigan) on 2011-06-14T00:36:46.000+0000
Fixed in trunk r24135 Merged to release-1.11 in r24136
Thanks for your bug report.