-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
!!! FEATURE: Stabilize WorkspaceName value object #5193
!!! FEATURE: Stabilize WorkspaceName value object #5193
Conversation
Extracted from #5146 this just improves stability of the `WorkspaceName` value object by - Restricting the allowed value range to 30 lower case characters and properly enforce it - Adding a `tryFromString()` constructor - Exposing the `MAX_LENGTH` and use that for the corresponding database schemas - 100% test coverage Related: #4726
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.
❤️
Neos.ContentRepository.Core/Classes/SharedModel/Workspace/WorkspaceName.php
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/SharedModel/Workspace/WorkspaceName.php
Show resolved
Hide resolved
I guess this does not fully solve your issue #5125, should it though or is that separate? |
Yes, I think it does. Added a |
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.
LGBR
I'm not sure what that means, but thanks for the +1 :) |
looks-good-by-reading i guess ^^ |
You might need to migrate your events with this migration: |
Btw while were hotfixing, we dont say what the attempted value was on error could be:
|
Gotcha, you suggest to include the attempted workspace name in the exception message?! |
BTW: It's almost as easy to create a PR on Github as it is to put code in a comment: #5204 ;) |
Extracted from #5146 this just improves stability of the
WorkspaceName
value object bytryFromString()
constructorMAX_LENGTH
and use that for the corresponding database schemasupgrade instructions
Possibly needs a migration (see #5202) which rewrites all events containing a workspaceName, which doesn't match the new workspaceName constraints and rewrites them with (shortend) a md5 hash of themself.
Run the migration with:
If the migration found some workspaceNames or baseWorkspaceNames to migrate, please run a projection replay of the workspace projection.
Fixes: #5125
Related: #4726