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

Code generation of an IntField uses String for minValue and maxValue #52

Closed
M-arcus opened this issue Dec 12, 2022 · 0 comments
Closed
Labels
kind/bug Something isn't working

Comments

@M-arcus
Copy link

M-arcus commented Dec 12, 2022

PHP Version

8.1

Shopware Version

6.4.18.0

Actual behaviour

When generating a definition with the command, it is possible to choose an IntField, and it's minValue and maxValue. The generated code of the min and max value is a String, not an Int. class IntField() only takes ?int as possible type. The generated code is:
new IntField('interval', 'interval', '1', '8766')

Expected behaviour

The generated code should be:
new IntField('interval', 'interval', 1, 8766)

Steps to Reproduce?

Generate a definition with an IntField with help of the command. Then input a minValue and a maxValue when asked by the command.

@M-arcus M-arcus added the kind/bug Something isn't working label Dec 12, 2022
@M-arcus M-arcus changed the title Code generation of an IntField Code generation of an IntField uses String for minValue and maxValue Dec 12, 2022
@shyim shyim closed this as completed in 08bb57d Feb 22, 2023
shyim added a commit that referenced this issue Feb 22, 2023
fix: formatting of values when they are nullable, fixes #52
github-actions bot pushed a commit that referenced this issue Feb 22, 2023
fix: formatting of values when they are nullable, fixes #52
shyim added a commit that referenced this issue Feb 22, 2023
…cae8f9592bdbd9cd4cfc8735ed7687928

fix: formatting of values when they are nullable, fixes #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant