ZF-6533: Router begins to treat '@' as a special character in version 1.8, which should be noted in "Migrating from Previous Versions" section

Issue Type: Docs: Problem Created: 2009-05-05T01:11:43.000+0000 Last Updated: 2009-05-10T07:03:44.000+0000 Status: Resolved Fix version(s): - 1.8.1 (12/May/09)

Reporter: twk (twk) Assignee: Ben Scholzen (dasprid) Tags: - Zend_Controller

Related issues: Attachments:


Zend_Controller_Router_Route used to treat '@' as a normal character, so I use it like 'user' => new Zend_Controller_Router_Route('@/:user_name/*', array('module' => $defaultModuleName, 'controller' => 'user')), it works on zf1.7 with

In 1.8, zf treats '@' as a marker of translated segment, so the above code does not work but throws an exception.…

To make it work as same as 1.7, I need to modify strangely like the following. 'user' => new Zend_Controller_Router_Route('@/:user_name/*', array('module' => $defaultModuleName, 'controller' => 'user'), array(), new Zend_Translate('array', array('' => '@'))),

I do not know it's the great way or not, but anyway this behavior change leads a backword-compatibility break, so that it should be noted in the migrating section in the document.…


Posted by Ben Scholzen (dasprid) on 2009-05-05T01:23:05.000+0000

Except mentioning that in the migration chapter, we could also allow escaping special chars (being colon ":" and at "@" in the beginning of a segment). Thus you would be able to use them again without a dirty workaround.

Posted by twk (twk) on 2009-05-05T01:50:59.000+0000

Maybe that's right, but I think every zf change that the zf-user needs to change his/her code should be noted in the migration chapter. Even if you have introduce the escape character (or a way to change special characters), zf-user needs a small mod to add an escape character, so still it should be noted in the migration chapter.

Posted by Ben Scholzen (dasprid) on 2009-05-05T02:35:07.000+0000

Whoops, I meant "Beside mentioning that..."

Posted by Ben Scholzen (dasprid) on 2009-05-09T09:34:24.000+0000

Escaping for beginning special characters is now :: and @@

Posted by twk (twk) on 2009-05-10T06:59:28.000+0000…

the @ character is no a special character in the beginning of a route segment. You mean "now a special character"?

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-05-10T07:03:42.000+0000

Yes, that is what's meant. The typo was solved yesterday, and will be put online within a few days (probably with the release of 1.8.1).

Closing for now.

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.