Skip to content

Conversation

@kojiromike
Copy link
Contributor

@kojiromike kojiromike commented Jan 17, 2026

Summary

  • Implements ConfigAccessorInterface with typed getters (get, getString, getBoolean, getInt, has)
  • Creates GlobalsAccessor class to centralize $GLOBALS access
  • Updates services to use dependency injection for testability

Fixes #19

Test plan

  • All 74 unit tests pass
  • PHPStan level 9 - no errors
  • PHPCS - no style violations
  • Integration test with OpenEMR Docker environment

🤖 Generated with Claude Code

- Add ConfigAccessorInterface with typed getters (get, getString, getBoolean, getInt, has)
- Implement GlobalsAccessor to wrap $GLOBALS access
- Update CodeImporter to use injected ConfigAccessorInterface
- Update OpenEMRConnector to use injected ConfigAccessorInterface
- Update ImportCodesCommand to wire up GlobalsAccessor by default
- Add comprehensive unit tests for GlobalsAccessor (21 tests)
- Update existing tests for new constructor signatures

Fixes #19

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@kojiromike kojiromike merged commit 954ac68 into main Jan 17, 2026
7 checks passed
@kojiromike kojiromike deleted the globalsaccessor branch January 17, 2026 19:43
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.

refactor: add GlobalsAccessor abstraction for OpenEMR globals access

2 participants