Skip to content
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

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

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 13, 2025

⚠️ 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
58 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant