Skip to content

Drop the no-op Closure import from CommitFlowTest - #28

Merged
imanimanyara merged 1 commit into
mainfrom
fix/no-op-closure-import
Oct 13, 2026
Merged

imanimanyara merged 1 commit into
mainfrom
fix/no-op-closure-import

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

What

Removes use Closure; from tests/Feature/CommitFlowTest.php.

Why

The file has no namespace, so the import names a global class in the global scope and does nothing. PHP 8.5 reports it on every run:

PHP Warning: The use statement with non-compound name 'Closure' has no effect in tests/Feature/CommitFlowTest.php on line 5

The Closure $next type hint in the anonymous pipe class resolves to \Closure without it.

Verified locally (PHP 8.5.11)

  • pest: 543 passed, and the warning no longer appears (it did before the change)
  • phpstan analyse --debug: no errors
  • pint --test with package-tools' pint.json: passed

The file has no namespace, so `use Closure;` imports a global class
into the global scope. PHP emits "The use statement with non-compound
name 'Closure' has no effect" on every test run. The type hint on
line 73 resolves to \Closure without it.
Copilot AI balanced review requested due to automatic review settings October 13, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit 2b24d28 into main Oct 13, 2026
5 checks passed
@imanimanyara
imanimanyara deleted the fix/no-op-closure-import branch November 1, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants