Skip to content

Fix https://github.com/slevomat/coding-standard/issues/1768 non-empty-lowercase-string, non-empty-array #1769

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkmuffme
Copy link

@kkmuffme kkmuffme commented Aug 5, 2025

Fix: #1768
Fix #1771

  • correctly handle all current and future string types
  • correctly handle additional int types
  • fix non-empty-array not correctly set as native type but set with hyphens
  • fix numeric also contains string (numeric-string specifically)

@kukulich
Copy link
Contributor

kukulich commented Aug 7, 2025

@kkmuffme Looks goods, please fix the build and rebase everything to one commit.

@kkmuffme kkmuffme force-pushed the fix-non-empty-lowercase-string-1768 branch from fe67be7 to 31cc54f Compare August 10, 2025 13:18
@kukulich
Copy link
Contributor

kukulich commented Aug 10, 2025

@kkmuffme Please dont do unrelated changes and code style changes.

@kkmuffme
Copy link
Author

Please dont do unrelated changes and code style changes.

Thanks for the comment - the CI reports those unrelated code style issues as errors though, that's why I fixed them. I'll just leave those phpcs reported CI issues that are outside of my changes there then (and the CI fail)

@kkmuffme kkmuffme force-pushed the fix-non-empty-lowercase-string-1768 branch 2 times, most recently from 84eefef to 6a5cbad Compare August 11, 2025 12:43
* correctly handle all current and future string types
* correctly handle additional int types
* fix non-empty-array not correctly set as native type but set with hyphens
* fix numeric also contains string (numeric-string specifically)
@kkmuffme kkmuffme force-pushed the fix-non-empty-lowercase-string-1768 branch from 13a2369 to eab784d Compare August 11, 2025 14:14
@kkmuffme
Copy link
Author

The failing, existing test is bc that test was already wrong beforehand and led to a fatal error in PHP <8, since "static" type is only available since PHP 8+
I didn't find how you handle tests that are version specific, please let me know, otherwise just remove that existing "static" test.

I think it also might make sense for the CI to actually use strict types on the test templates and use php -l linting to catch tests that will result in fatal errors.

@kkmuffme kkmuffme marked this pull request as ready for review August 11, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants