# PHPUnit - Compatibility Research

## Latest Version & Changes
**Current Latest**: PHPUnit 12.3.10 (September 11, 2025)
**PHP 8.0 Compatibility**: Requires PHPUnit 9.3.0+ (NOT latest version)

### Version Matrix
- **PHPUnit 12.x**: Requires PHP ≥8.3
- **PHPUnit 11.x**: Requires PHP ≥8.2  
- **PHPUnit 10.x**: Requires PHP ≥8.1
- **PHPUnit 9.3.0+**: Supports PHP 8.0

## Known Issues & Problems  
- **PHP 8.0 + Latest PHPUnit**: INCOMPATIBLE
- **Union Types**: PHPUnit 8.5 doesn't support PHP 8 union types
- **Feature Limitations**: Older PHPUnit versions lack modern features
- **Security Support**: PHP 8.0 EOL impacts testing security

## Best Practices & Recommendations
### For PHP 8.0 Projects
- **Use**: PHPUnit 9.3.0+ (not latest 12.x)
- **Consider**: phpunit-polyfills library for compatibility
- **Migration Path**: Upgrade to PHP 8.1+ → PHPUnit 10+

### Optimal Setup (2025)
- **PHP Version**: 8.1+ (minimum) or 8.4 (recommended)
- **PHPUnit Version**: Latest compatible (10+ or 12.x)
- **Testing Strategy**: Full feature support with modern PHP

### Production Testing
- **Coverage**: 90%+ recommended with compatible PHPUnit
- **Integration**: Full API endpoint testing
- **Performance**: Load testing capabilities

Research Date: 2025-09-12
**VERDICT**: ⚠️ CONSTRAINED - PHP 8.0 limits PHPUnit version options