Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

[BC break] Remove old InjectTemplateListener behavior #139

Merged
merged 1 commit into from
May 31, 2016
Merged

[BC break] Remove old InjectTemplateListener behavior #139

merged 1 commit into from
May 31, 2016

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented May 17, 2016

Removed old pseudomodule template name resolution which ignored subnamespaces and used __NAMESPACE__ variable in convoluted and non-intuitive ways.
Whitelisted classname based template name resolution introduced in ^2.3.0 is now default
Template resolution follows these rules:

  1. strip \Controller\ namespace if present
  2. strip trailing Controller in classname, unless classname is exactly Controller
  3. inflect CamelCase to dash
  4. replace namespace separator with slash

See zendframework/zendframework#5670

This breaks backwards compatibility in some cases, check couple changed tests.

Affected modules can achieve compatibility with v2 and v3 simultaneously by adding whitelist entry to template map and moving templates or by mapping namespace to old location.

Needs documentation. If anyone is willing to write it for me I definitely won't object to that

Whitelisted classname based template name resolution from ^2.3.0 is now
default

Template resolution follows these rules:
1. strip \Controller\ namespace if present
2. strip trailing Controller in classname
3. inflect CamelCase to dash
4. replace namespace separator with slash

@see zendframework/zendframework#5670
@Xerkus Xerkus changed the title Remove old InjectTemplateListener behavior [BC break] Remove old InjectTemplateListener behavior May 17, 2016
@weierophinney
Copy link
Member

@Xerkus Could you please add some verbiage into doc/book/migration/to-v3-0.md detailing the impact of this for users? I can then merge.

Thanks!

@weierophinney
Copy link
Member

@Xerkus You can even leave a comment on the issue if you want, and I can then draft up the migration doc changes.

@weierophinney weierophinney merged commit 1e075b2 into zendframework:develop May 31, 2016
weierophinney added a commit that referenced this pull request May 31, 2016
…ver-behavior

[BC break] Remove old InjectTemplateListener behavior
weierophinney added a commit that referenced this pull request May 31, 2016
weierophinney added a commit that referenced this pull request May 31, 2016
weierophinney added a commit that referenced this pull request May 31, 2016
@Xerkus Xerkus deleted the feature/remove-old-template-resolver-behavior branch June 6, 2016 05:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants