-
Notifications
You must be signed in to change notification settings - Fork 28
Allow path providers that don't add path elements each time #47
Conversation
Hi @sroze - what is the use case for this? |
Hi @dantleech . The use case can be (and that's mine) for a custom path provider that add an url prefix in case of the content has a non-empty attribute. If this attribute is empty (and in my case it is possible) the provider don't add any path element. |
Cool, sounds logical enough. Do you think you could add a test for this feature in the corresponding unit test cases? |
Added tests and squashed. |
cool, nice work! @dbu @wouterj does this make sense to you? For the documentation I created an issue: symfony-cmf/symfony-cmf-docs#357 @wouterj has refactored the docs for this bundle (https://github.com/symfony-cmf/symfony-cmf-docs/pull/353/files#diff-9832a4ffd030208d93ebf8eab4826451R4), so probably better to wait until that is merged before documenting this feature. |
@dantleech you have the vision for this bundle, so you have the final call on merging imo. but i think its a cool improvement and i see the use cases. |
@@ -16,6 +16,12 @@ public function setUp() | |||
$this->route2 = new \stdClass; | |||
} | |||
|
|||
public function testGetEmptyPath () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space before ()
Yeah, sounds good to me. +1 |
Allow path providers that don't add path elements each time
@sroze thanks! fyi it helps if you always add a comment after pushing a new commit, as we are not automatically notified when new commits are added. |
@dantleeck, i'll do that the next time. Thanks ! |
This PR allow path providers to don't add path elements on each
RouteStack
objects.This simply allow an empty path for
RouteStack
s.