Instead of think about ZF2 || Symfony 2 think about ZF2 && Symfony 2

, ,

… if you want to use a good Symfony 2 bundle in ZF2 or a good ZF2 module in Symfony2
Symfony2 in ZF2

https://speakerdeck.com/skoop/zend-framework-2-and-symfony2-the-perfect-team-phpday-2013

https://speakerd.s3.amazonaws.com/presentations/7ac72050a1d901304c7f227bb3c2be12/ZF2_and_Symfony2_phpday.pdf

Symfony2 in ZF2
{
“require”: {
“php”: “>=5.3.3”,
“zendframework/zendframework”: “2.0.*”,
“symfony/yaml”: “2.2.*”,
“symfony/dom-crawler”: “2.2.*”,
},
“autoload”: {
“psr-0”: {
“Application”: “module/Application/src”
}
}
}

Zend Framework 2 – routing & problem

,

Routing : http://framework.zend.com/manual/2.0/en/modules/zend.mvc.routing.html

http://zf-tutorial/album/add – 200 – works fine
http://zf-tutorial/album/add/ – 404 – The requested URL could not be matched by routing.

To handle that, just add the empty “/” in the end of route segment :

‘route’ => ‘/[:controller[/[:action[/]]]]’,

Or for “:slug” segment :

‘route’ => ‘/[:controller[/[:action[/[:slug[/]]]]]]’,

http://samsonasik.wordpress.com/2012/07/24/zend-framework-2-trailing-slash/