Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 20, 2025

TypeString::isNullable(): correctly handle FQN null

Includes tests.

TypeString::isKeyword(): correctly handle FQN null/true/false

Includes tests.

TypeString::normalizeCase(): normalize FQN true/false/null to unqualified

Includes tests.

TypeString: add more tests with FQN true/false/null

@jrfnl jrfnl added this to the 1.1.2 milestone Aug 20, 2025
@jrfnl jrfnl merged commit a342627 into develop Aug 20, 2025
67 of 70 checks passed
@jrfnl jrfnl deleted the feature/typestring-improve-handling-fqn-true-false-null branch August 20, 2025 21:50
@jrfnl
Copy link
Member Author

jrfnl commented Aug 20, 2025

Pfff.. cricky... while testing something else, I only just found that fully qualified true/false/null is actually not even allowed in type declarations in PHP and will lead to "Fatal error: Type declaration 'null' must be unqualified" errors.

Having said that, as PHPCS is generally parse error/user error tolerant, I don't think the changes in this PR are a bad thing. Just maybe not totally necessary either.

@jrfnl jrfnl removed the Type: bug label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants