@@ -417,17 +417,16 @@ template using a variety of heuristics, including an explicit map provided
417417during configuration, or auto-detection based on the controller class name.
418418
419419In version 2, the autodetection took into consideration the ` __NAMESPACE__ `
420- route match parameter to derive subnamespaces or would omit them completely if
421- ` __NAMESPACE__ ` is not present. This caused issues when multiple modules shared
422- a top-level namespace (e.g., ` ZF\Apigility ` and ` ZF\Apigility\Admin ` ) if each
420+ route match parameter to derive subnamespaces, or would omit them completely if
421+ ` __NAMESPACE__ ` was not present. This caused issues when multiple modules shared
422+ a top-level namespace (e.g., ` ZF\Apigility ` and ` ZF\Apigility\Admin ` ) and each
423423had a controller with the same name.
424424
425425To avoid naming conflicts, version 3 removes this aspect of autodetection, and
426426instead provides exactly one workflow for mapping:
427427
428- - Strip the ` Controller ` subnamespace, if present (e.g.,
429- the namespace ` Application\Controller\ ` is normalized to
430- ` Application\ ` ).
428+ - Strip the ` Controller ` subnamespace, if present (e.g., the namespace
429+ ` Application\Controller\\ ` is normalized to ` Application\\ ` ).
431430- Strip the ` Controller ` suffix in the class name, if present (e.g.,
432431 ` IndexController ` is normalized to ` Index ` ).
433432- Inflect CamelCasing to dash-separated (e.g., ` ShowUsers ` becomes
@@ -439,8 +438,8 @@ As a full example, the controller service name
439438` test-something/with/camel-case ` , regardless of the ` __NAMESPACE__ ` value
440439provided in routing configuration.
441440
442- Similar behavior in version 2 could be achieved with namespace whitelisting in
443- controller to template map
441+ If needed, you can emulate the version 2 behavior in version 3 via namespace
442+ whitelisting in the controller & lt ; = & gt ; template map.
444443
445444## Zend\Mvc\View\SendResponseListener
446445
0 commit comments