Skip to content

Comments

feat(deps): add phpstan-disallowed-calls and phpstan-deprecation-rules#16

Merged
kojiromike merged 1 commit intomainfrom
more-rules
Jan 18, 2026
Merged

feat(deps): add phpstan-disallowed-calls and phpstan-deprecation-rules#16
kojiromike merged 1 commit intomainfrom
more-rules

Conversation

@kojiromike
Copy link
Contributor

@kojiromike kojiromike commented Jan 17, 2026

Summary

  • Add spaze/phpstan-disallowed-calls ^4.0 and phpstan/phpstan-deprecation-rules ^2.0
  • Migrate SQL functions and call_user_func to disallowedFunctionCalls config
  • Remove custom ForbiddenFunctionsRule (now handled by spaze config)
  • Consolidate core.neon and module.neon into single extension.neon
  • Enable auto-loading via phpstan/extension-installer

Test plan

  • All 23 PHPUnit tests pass
  • PHPStan analysis passes on src/
  • Tested in OpenEMR - rules load correctly

🤖 Generated with Claude Code

Add third-party PHPStan extensions and consolidate configuration:

Dependencies:
- Add spaze/phpstan-disallowed-calls ^4.0 for forbidding function calls
- Add phpstan/phpstan-deprecation-rules ^2.0 for deprecation reporting

Configuration changes:
- Migrate SQL functions (sqlQuery, sqlStatement, etc.) to disallowedFunctionCalls
- Add call_user_func/call_user_func_array to disallowedFunctionCalls
- Consolidate core.neon and module.neon into single extension.neon
- Enable phpstan/extension-installer auto-loading via extra.phpstan.includes
- Enable sort-packages in composer config

Removed:
- Custom ForbiddenFunctionsRule class (now handled by spaze config)
- Separate core.neon and module.neon files

Documentation:
- Update README with simplified usage (auto-loaded, no manual include needed)
- Add warning about duplicate include errors
- Use first-class callable syntax in examples
- Update copyright year to 2026

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kojiromike kojiromike merged commit 6b47192 into main Jan 18, 2026
13 checks passed
@kojiromike kojiromike deleted the more-rules branch January 18, 2026 00:02
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.

1 participant