Commit c522fb8
committed
refactor: Modernize PHP SDK with enhanced type safety and new DTO models
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.neon1 parent 1cb50f3 commit c522fb8
144 files changed
Lines changed: 11200 additions & 3958 deletions
File tree
- .vscode
- src
- Api
- Cache
- Config
- Decision
- Enum
- Flag
- Hit
- Model
- Traits
- Utils
- Visitor
- tests
- Api
- Assets
- Decision
- Flag
- Hit
- Model
- Traits
- Utils
- Visitor
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| 43 | + | |
34 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
35 | 49 | | |
36 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
37 | 57 | | |
38 | 58 | | |
0 commit comments