Skip to content

Refactor: Modernize PHP SDK with enhanced type safety and new DTO models#89

Merged
Heihokon merged 1 commit intomainfrom
fix-deprecated-log
Jan 13, 2026
Merged

Refactor: Modernize PHP SDK with enhanced type safety and new DTO models#89
Heihokon merged 1 commit intomainfrom
fix-deprecated-log

Conversation

@Heihokon
Copy link
Collaborator

New Features:

  • Introduced comprehensive DTO models for campaigns, variations, targeting, and troubleshooting
  • Added Types trait for centralized type definitions with PHPStan-level type safety
  • Implemented ContainerException for better error handling
  • Enhanced visitor strategies with context updates and troubleshooting support

Improvements:

  • Removed deprecated FlagshipLogManager8 class
  • Updated ModificationsDTO value type from mixed to array for consistency
  • Refactored ContainerInterface with improved type specifications
  • Updated HttpClient with better error handling and type safety
  • Enhanced MurmurHash, Curl, and logging interfaces for clarity
  • Added utility methods in Helper trait for array operations
  • Improved flag activation with flag key inclusion in hits
  • Updated return types across DecisionManagerAbstract and various interfaces

Testing:

  • Refactored test suite to use BaseTestCase for consistency
  • Added comprehensive unit tests for new DTO classes
  • Enhanced test coverage for FlagshipLogManager, HttpClient, and strategy classes
  • Improved test readability with standardized formatting and assertions

Configuration:

  • Updated PHPStan configuration with new rules and future compatibility
  • Enhanced composer.json with additional static analysis tools
  • Refined phpstan.neon and added phpstan-future.neon

New Features:
- Introduced comprehensive DTO models for campaigns, variations, targeting, and troubleshooting
- Added Types trait for centralized type definitions with PHPStan-level type safety
- Implemented ContainerException for better error handling
- Enhanced visitor strategies with context updates and troubleshooting support

Improvements:
- Removed deprecated FlagshipLogManager8 class
- Updated ModificationsDTO value type from mixed to array for consistency
- Refactored ContainerInterface with improved type specifications
- Updated HttpClient with better error handling and type safety
- Enhanced MurmurHash, Curl, and logging interfaces for clarity
- Added utility methods in Helper trait for array operations
- Improved flag activation with flag key inclusion in hits
- Updated return types across DecisionManagerAbstract and various interfaces

Testing:
- Refactored test suite to use BaseTestCase for consistency
- Added comprehensive unit tests for new DTO classes
- Enhanced test coverage for FlagshipLogManager, HttpClient, and strategy classes
- Improved test readability with standardized formatting and assertions

Configuration:
- Updated PHPStan configuration with new rules and future compatibility
- Enhanced composer.json with additional static analysis tools
- Refined phpstan.neon and added phpstan-future.neon
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@Heihokon Heihokon merged commit a4162e7 into main Jan 13, 2026
2 of 3 checks passed
@Heihokon Heihokon deleted the fix-deprecated-log branch January 13, 2026 14:58
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