ZF-9502: Zend_Tool breaks existing code when creating a new action in the existing controller.

Issue Type: Bug Created: 2010-03-22T03:33:46.000+0000 Last Updated: 2010-11-23T21:58:07.000+0000 Status: Resolved Fix version(s): Reporter: Mordehai German (hillel) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Tool

Related issues: - ZF-9501



I use Zend_Tool from the command line (Windows) to create action in the existing controller, but it has added tabs and spaces, and this time it has removed one line where there was a closing brace...

Usually I have to clean up after him (Zend_Tool), he is such a naughty, :-).


Posted by Mateusz Tymek (mtymek) on 2010-08-17T05:44:32.000+0000

Simple way to reproduce this bug:

zf create controller test

Open TestController in your editor and add "if" to index action: <?php

class TestController extends Zend_Controller_Action { public function indexAction() { if ($a) {



Then create new action:

zf create action foobar Test

After that controller's code will be broken:

public function indexAction()
    if ($a) {       // <- closing brace is removed

public function foobarAction()
    // action body

Posted by Patrick Bielen (bieleke) on 2010-09-27T09:05:36.000+0000

Bug confirmed, i just ranned into it.

Not only it wipes the closing } of an if-construction, but it also indents the code with two tabs (or 8 spaces).

Posted by Ramon Henrique Ornelas (ramon) on 2010-11-20T11:48:04.000+0000

Duplicates of the ZF-9501.

Posted by Marc Hodgins (mjh_ca) on 2010-11-23T21:58:07.000+0000

Removing fix version. Issues marked 'duplicate' don't need a fix version -- it makes them appear in the JIRA changelog and/or roadmap.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.