Skip to content

feat(SlevomatCodingStandard.Functions.StaticClosure): enable again outside tests#57

Merged
pekral merged 1 commit into
masterfrom
feat/static-closure-enable
Mar 31, 2026
Merged

feat(SlevomatCodingStandard.Functions.StaticClosure): enable again outside tests#57
pekral merged 1 commit into
masterfrom
feat/static-closure-enable

Conversation

@pekral

@pekral pekral commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Re-enables SlevomatCodingStandard.Functions.StaticClosure rule for non-test PHP code
  • Excludes the rule from tests/* directory because PEST framework does not support static closures
  • Replaces the global <exclude> with a <rule> + <exclude-pattern> configuration

Changes

The rule was previously fully excluded from the entire codebase. Now it is active for all production code while tests remain exempt.

<!-- Before -->
<exclude name="SlevomatCodingStandard.Functions.StaticClosure" />

<!-- After -->
<rule ref="SlevomatCodingStandard.Functions.StaticClosure">
    <exclude-pattern>tests/*</exclude-pattern>
</rule>

Test plan

  • All 10 existing tests pass
  • PHPCS checks pass (composer check)
  • Rector fixers run clean (composer fix)

Closes #56

🤖 Generated with Claude Code

…tside tests

Re-enable StaticClosure rule for non-test code. PEST framework does not support
static closures, so the rule is excluded from the tests/* directory only.

Closes #56

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pekral
pekral merged commit 58f54a8 into master Mar 31, 2026
2 checks passed
@pekral
pekral deleted the feat/static-closure-enable branch March 31, 2026 18:37
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.

feat(SlevomatCodingStandard.Functions.StaticClosure): enable again

1 participant