Skip to content

Conversation

@kojiromike
Copy link
Contributor

Summary

  • Add ForbiddenCurlFunctionsRule to block raw curl_* functions (requires PSR-18 HTTP client)
  • Add ForbiddenMethodsRule to block deprecated methods like GenID()
  • Add ForbiddenStaticMethodsRule to block QueryUtils::startTransaction() etc. (requires inTransaction() wrapper)

Test plan

  • All new rules have PHPUnit tests
  • composer check passes

🤖 Generated with Claude Code

Add three rules that exist in OpenEMR's .phpstan/ directory:

- ForbiddenCurlFunctionsRule: Blocks raw curl_* functions, requires
  PSR-18 HTTP client instead of Guzzle-specific recommendation
- ForbiddenMethodsRule: Blocks deprecated methods like GenID()
- ForbiddenStaticMethodsRule: Blocks QueryUtils transaction methods,
  requires inTransaction() wrapper

Includes tests for all new rules.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@kojiromike kojiromike merged commit 8b342e4 into main Jan 17, 2026
13 checks passed
@kojiromike kojiromike deleted the feat-missing-rules branch January 17, 2026 20:09
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