Skip to content

FunctionDeclarations::getProperties(): add more defensive coding#740

Merged
jrfnl merged 1 commit intodevelopfrom
feature/functiondeclarations-getproperties-more-defensive-coding
Dec 1, 2025
Merged

FunctionDeclarations::getProperties(): add more defensive coding#740
jrfnl merged 1 commit intodevelopfrom
feature/functiondeclarations-getproperties-more-defensive-coding

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 30, 2025

... to prevent a particular type of parse error from grabbing too many tokens as the "return type".

Includes test.

@jrfnl jrfnl added this to the 1.2.x Next milestone Nov 30, 2025
@jrfnl jrfnl force-pushed the feature/functiondeclarations-getproperties-more-defensive-coding branch from 62dafc4 to e0ede90 Compare November 30, 2025 09:32
@jrfnl
Copy link
Member Author

jrfnl commented Nov 30, 2025

Hmm.. okay, so this won't be able to get a passing build until PHPCS 4.0.2 has been released and PHPCSUtils then drops support for PHPCS < 4.0.2 due to the (void) cast being polyfilled in PHPCS itself.

That is unrelated to this PR though.

... to prevent a particular type of parse error from grabbing too many tokens as the "return type".

Includes test.
@jrfnl
Copy link
Member Author

jrfnl commented Dec 1, 2025

Temporary fix pulled via #742. Rebased this PR now without changes to get a passing build.

@jrfnl jrfnl force-pushed the feature/functiondeclarations-getproperties-more-defensive-coding branch from e0ede90 to d5ac1fb Compare December 1, 2025 10:04
@jrfnl jrfnl merged commit 73eea42 into develop Dec 1, 2025
85 checks passed
@jrfnl jrfnl deleted the feature/functiondeclarations-getproperties-more-defensive-coding branch December 1, 2025 10:28
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.

1 participant