Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set a controller map template replacement to an empty string #38

Closed
michalbundyra opened this issue Jan 15, 2020 · 2 comments
Closed

Comments

@michalbundyra
Copy link
Member

The Inject template listener allows specifying a controller_map to map namespaces or specific controllers to directories. It is not currently possible to specify a mapping for a namespace to '' eg:

'controller_map' => [
    'my/long/namespace' => '',
]

This is due to a == comparison with false in the listener on line 142:
https://github.com/zendframework/zend-mvc/blob/f46acd021a0d571bc5df400bdd55243adc53580e/src/View/Http/InjectTemplateListener.php#L142 which should probably be ===

Fixing this may break BC...


Originally posted by @carnage at zendframework/zend-mvc#12

@michalbundyra
Copy link
Member Author

Suggestions:

  • proposed fix is a bc break, no-go, even for 3.x (it is subtle)
  • use a separate listener for this functionality, and make it act with a lower priority (should be BC compliant then)

Originally posted by @Ocramius at zendframework/zend-mvc#12 (comment)

@alexmerlin
Copy link
Member

Closing issue due to being inactive for more than 1 year.

@alexmerlin alexmerlin closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants