Skip to content

BCFile::getDeclarationName(): sync with upstream#644

Merged
jrfnl merged 1 commit into
developfrom
feature/getdeclarationname-sync-with-upstream
Feb 15, 2025
Merged

BCFile::getDeclarationName(): sync with upstream#644
jrfnl merged 1 commit into
developfrom
feature/getdeclarationname-sync-with-upstream

Conversation

@jrfnl

@jrfnl jrfnl commented Feb 13, 2025

Copy link
Copy Markdown
Member

⚠️ Wait with merging until the upstream PR has been accepted! ⚠️ The upstream PR has been merged.


The upstream File::getDeclarationName() method is slated to receive a bug fix in the PHPCS 3.12.0 release to prevent incorrect results for unfinished closures with typed parameters.

The PHPCSUtils native ObjectDeclarations::getName() method already handled this correctly.

This commit polyfills the upstream method via the BCFile class and syncs the tests with the upstream changes.

Ref: PHPCSStandards/PHP_CodeSniffer#816

The upstream File::getDeclarationName() method is slated to receive a bug fix in the PHPCS 3.12.0 release to prevent incorrect results for unfinished closures with typed parameters.

The PHPCSUtils native `ObjectDeclarations::getName()` method already handled this correct.

This commit polyfills the upstream method via the BCFile class and syncs the tests with the upstream changes.

Ref: PHPCSStandards/PHP_CodeSniffer 816
@jrfnl
jrfnl force-pushed the feature/getdeclarationname-sync-with-upstream branch from eb8a591 to d44b561 Compare February 15, 2025 22:29
@jrfnl
jrfnl marked this pull request as ready for review February 15, 2025 23:55
@jrfnl jrfnl added this to the 1.1.0 milestone Feb 15, 2025
@jrfnl
jrfnl merged commit 060222e into develop Feb 15, 2025
@jrfnl
jrfnl deleted the feature/getdeclarationname-sync-with-upstream branch February 15, 2025 23:57
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