Skip to content

Added strict validation because null can implicitly convert to zero, … #81

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

Merged

Conversation

kolodkinvalentin
Copy link
Contributor

…and that didn't work for enums containing zero.

…and that didn't work for enums containing zero.
@wol-soft
Copy link
Owner

wol-soft commented Sep 6, 2024

Hi, thanks for the contribution. Can you add a test case for the described behaviour? It belongs here https://github.com/wol-soft/php-json-schema-model-generator/blob/master/tests/Objects/EnumPropertyTest.php

@coveralls
Copy link

coveralls commented Sep 6, 2024

Pull Request Test Coverage Report for Build 10738122307

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.848%

Totals Coverage Status
Change from base Build 10451489220: 0.0%
Covered Lines: 3003
Relevant Lines: 3038

💛 - Coveralls

…o successfully create an object with an optional zero field
@kolodkinvalentin
Copy link
Contributor Author

Hi!, I tried adding a simple test for the successful creation of an object with an optional field. I also added a zero value to the UntypedEnumProperty.json file. If we remove yesterday's changes on AbstractPropertyProcessor, the tests will fail with errors.

@wol-soft wol-soft merged commit 1bb1374 into wol-soft:master Sep 6, 2024
5 checks passed
@wol-soft
Copy link
Owner

wol-soft commented Sep 6, 2024

Thanks! Great contribution! I'll tag a new patch version including the change

@kolodkinvalentin kolodkinvalentin deleted the fix-implicit-null-allowed branch September 6, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants