shopware icon indicating copy to clipboard operation
shopware copied to clipboard

Feature/allow numbers in contenttype names

Open bforbird opened this issue 1 year ago • 1 comments

1. Why is this change necessary?

After SW-26513 numbers are no longer allowed in naming of content types

2. What does this change do, exactly?

Changes regex to allow numbers.

3. Describe each step to reproduce the issue or behaviour.

Create a content type with a number in the name. For example "b2b".

4. Please link to the relevant issues (if any).

5. Which documentation changes (if any) need to be made because of this PR?

6. Checklist

  • [x] I have written tests and verified that they fail without my change
  • [x] I have squashed any insignificant commits
  • [x] This change has comments for package types, values, functions, and non-obvious lines of code
  • [x] I have read the contribution requirements and fulfill them.

bforbird avatar Oct 06 '22 14:10 bforbird

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 06 '22 14:10 CLAassistant

thanks for your contribution 🙂👍

@xf- does this look okay for you? 😉

mitelg avatar Oct 07 '22 05:10 mitelg

Edit: Code changed and/fixed.

Regex looks fine, no clue if all the converter into SQL, PHP, and JS do the right job. Tried KISS, I will continue to avoid numbers

xf- avatar Oct 07 '22 11:10 xf-

Thanks! :wink:

bforbird avatar Oct 07 '22 11:10 bforbird

Hi @xf- , that's right, only for the last section. The first section says the name should always contain 1 letter. [A-z] -> single character, followed by zero or more [A-z0-9]

Saw a different version or overlooked the unchanged non highlighted part. I noticed & edited the comment, while you wrote the last one.

xf- avatar Oct 07 '22 11:10 xf-

Hello,

thank you for creating this pull request. I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/SW-26953

Please use this issue to track the state of your pull request.

shopwareBot avatar Oct 10 '22 09:10 shopwareBot

thanks for your contribution @bforbird 👍🎉💙

merged with https://github.com/shopware/shopware/commit/2ec8463b880b4a7620c9927adca73c869859fcec Will be part of 5.7.17

mitelg avatar Oct 24 '22 15:10 mitelg