Issues

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

Issue Type: 1.x to 2.x Integration Created: 2011-07-13T16:40:42.000+0000 Last Updated: 2011-12-23T01:00:30.000+0000 Status: Resolved Fix version(s): Reporter: Artur Bodera (joust) Assignee: Ralph Schindler (ralph) Tags: - Zend\Mvc\Controller

  • default
  • module
  • php

Related issues: Attachments:

Description

<pre class="highlight">
# zf create module default
# zf create controller Index 1 default

Will create the following IndexController.php file:

<pre class="highlight">
<?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

Posted by Rob Zienert (pievendor) on 2011-07-14T14:12:59.000+0000

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

Posted by Artur Bodera (joust) on 2011-07-14T21:19:08.000+0000

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.)

Posted by Ralph Schindler (ralph) on 2011-12-09T18:43:39.000+0000

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".

Posted by Evan Coury (evan.pro) on 2011-12-23T01:00:30.000+0000

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.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts