-
-
Notifications
You must be signed in to change notification settings - Fork 99
[WIP] Field slugifier id generator #585
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: 2.0.x
Are you sure you want to change the base?
Conversation
/** | ||
* @group functional | ||
*/ | ||
class PhpArrayTest extends \Doctrine\Tests\ODM\PHPCR\PHPCRFunctionalTestCase |
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.
Bah .. not part of this PR
After some reflection I think if anything this should be about normalization and not slugification. After all it is perfectly valid to have spaces and non-url-safe characters in a node name. |
/** | ||
* Set slugifier callable | ||
* | ||
* PHP callable for peroforming slugification when using the |
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.
s/peroforming/performing
hey, cool. i think this is almost ready. agree that this could be called NormalizedFieldIdGenerator or something. when you want to use the path in a URL, you do want it to be slugified. otherwise you want potentially unsupported characters replaced. and in all cases, you must translate |
that default normalizer could also get us rid of adding a dependency for a slugifier. we can then explain how to use that instead of the default normalizer in the doc. |
@dantleech something for an upcoming phpcr-odm 2.0? or should we drop this and leave it to other layers of the application to generate ids? |
Just an idea of how this might work.