Issues

ZF2-33: Default module conflicts with PHP 5.3 reserved keyword "default"

Description


# zf create module default
# zf create controller Index 1 default

Will create the following IndexController.php file:


<?php

/** @namespace */
namespace Default;

class IndexController extends Zend\Controller\Action
{

// [...]

The file is not a valid PHP 5.3 code, because: {quote} PHP Parse error: syntax error, unexpected T_DEFAULT, expecting T_STRING or T_NS_SEPARATOR or '{' in IndexController.php on line 4 {quote}

btw: shouldn't this issue type be called "1.x to 2.x Migration" instead of "1.x to 2.x Integration" ?

Comments

It's been proposed that the new "default" module will be renamed to core. Try using that instead.

Actually, I've dug into Zend\Controller* and you're wrong.

Current trunk and dev3 uses "Application" as the default namespace. After renaming to that, everything went on (including auto plugin namespaces, loading etc.)

Zend\Tool has not been updated yet. Once the refactor takes place, "project generation" (if that is the route we go) will not use "Default".

I'm going to go ahead and close this. I'd say it's pretty much settled at this point that the default suggested module name will be Application. Any objections can be raised on the ML.