Critical difference for interoperability: Yii3 and Spiral lead with full PSR compliance. Symfony has excellent support with some bridges. Laravel has selective compliance. CodeIgniter has minimal compliance.
| PSR Standard | Symfony 7.3 | Laravel 11 | Spiral 3.15 | CodeIgniter 4.6 | Yii 3 |
|---|---|---|---|---|---|
| PSR-1: Basic Coding | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| PSR-2/12: Coding Style | ✅ Full (PSR-12) | ✅ Full (PSR-12) | ✅ Full (PSR-12) | ✅ Full (PSR-12) | |
| PSR-3: Logger | ✅ Full (Monolog) | ✅ Full | ✅ Full (Monolog) | ✅ Full | ✅ Full |
| PSR-4: Autoloading | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full (Composer) |
| PSR-6: Cache | ✅ Full | ❌ Adapter pkg | ✅ Supported | ||
| PSR-7: HTTP Messages | ✅ Native | ❌ Custom HTTP | ✅ Native | ||
| PSR-11: Container | ✅ Full (3.3+) | ✅ Full | ✅ Full | ❌ Service Locator | ✅ Full |
| PSR-14: Event Dispatcher | ❌ Custom | ✅ Full | ❌ Custom | ✅ Full | |
| PSR-15: HTTP Handlers | ❌ Custom | ✅ Full | ❌ Filters | ✅ Full | |
| PSR-16: Simple Cache | ✅ Full | ✅ Full | ❌ Adapter pkg | ✅ Full | |
| PSR-17: HTTP Factories | ❌ Custom | ✅ Full | ❌ No | ✅ Required | |
| PSR-18: HTTP Client | ✅ Full | ❌ Custom (Guzzle) | ✅ Supported | ❌ CURLRequest | ✅ Compatible |
Legend:
- ✅ Full = Native implementation
⚠️ Bridge/Partial = Supported via bridges or partial- ❌ = Not compliant/custom implementation
Strengths:
- PSR-11 (Container): Native since version 3.3
- PSR-3 (Logger): Monolog integration
- PSR-6, PSR-16 (Cache): symfony/cache implements both
- PSR-18 (HTTP Client): symfony/http-client native PSR-18
Requires bridges:
- PSR-7 (HTTP):
symfony/psr-http-message-bridge+nyholm/psr7 - PSR-15 (Middleware): Via PSR-7 bridge + third-party bundles
- PSR-14 (Events): Compatible but not strict PSR-14 interface
Philosophy: Prioritizes HttpFoundation (richer API than PSR-7) but provides bridges for interoperability.
Strengths:
- PSR-1, PSR-2/12 (Coding): Laravel Pint enforces
- PSR-3 (Logger): Built on PSR-3
- PSR-4 (Autoloading): Full Composer PSR-4
- PSR-11 (Container): Native implementation
Custom implementations:
- PSR-7 (HTTP): Symfony HttpFoundation, not PSR-7
- PSR-14 (Events): Custom event system
- PSR-15 (Middleware): Custom middleware signature
- PSR-18 (HTTP Client): Guzzle internally but doesn't expose PSR-18
Philosophy: "Developer experience over strict PSR compliance" - follows PSRs where beneficial, custom solutions where it improves DX.
Exceptional compliance:
- All HTTP-related PSRs native: PSR-7, PSR-15, PSR-17
- PSR-11 (Container): Custom but fully compliant
- PSR-14 (Events): Full implementation
- PSR-16 (Cache): Native support
- PSR-3 (Logger): Monolog integration
Marketing: "PSR-{3,4,7,11,12,14,15,16,17} compliant" (official docs)
Philosophy: PSR compliance as core architectural principle. Designed for interoperability.
Strengths:
- PSR-1 (Coding): Full
- PSR-2/12 (Style): Mostly (not all recommendations)
- PSR-3 (Logger): Full implementation
- PSR-4 (Autoloading): Full Composer PSR-4
Not compliant:
- PSR-6, PSR-16 (Cache): Separate adapter module (
codeigniter4/cache) - PSR-7 (HTTP): "Does not strive for compatibility" (official stance)
- PSR-11 (Container): Service Locator, not PSR-11
- PSR-14 (Events): Custom Events system
- PSR-15 (Middleware): Filters with different signature
- PSR-17, PSR-18: No support
Philosophy: "Simplicity and performance over standard compliance". Lightweight footprint prioritized.
Exceptional compliance - most compliant framework:
- Complete rewrite for PSR compliance - key goal of Yii3
- PSR-3, 4, 7, 11, 14, 15, 16: Full native implementations
- PSR-17 (HTTP Factories): Required dependency (external implementation)
- PSR-6, PSR-18: Supported/Compatible
Philosophy: Yii3 was completely rewritten with PSR compliance as primary goal. Dropped Yii2's custom patterns in favor of standards.
- ✅ Can use any PSR-compliant libraries directly
- ✅ PSR-15 middleware from Packagist works without adaptation
- ✅ PSR-14 event listeners interoperable
- ✅ PSR-11 containers swappable
- ✅ Easier integration with microservices (shared PSR interfaces)
⚠️ Requires bridges for PSR-7/15 middleware⚠️ Custom event system - not interoperable with PSR-14- ✅ PSR-11 container allows some interoperability
⚠️ Framework-specific implementations for many concerns
- ❌ Difficult to use PSR-based libraries
- ❌ No PSR-15 middleware support
- ❌ Custom implementations for most components
- ✅ Lightweight and simple for self-contained apps
Maximum PSR compliance and interoperability:
- Yii 3 (10/12 native) - best for greenfield projects
- Spiral (11/12) - best for performance + compliance
- Symfony (9/12 + bridges) - best for enterprise
Developer Experience prioritized:
- Laravel - best DX, largest ecosystem, accepts PSR trade-offs
- CodeIgniter - simplicity, minimal overhead
- Symfony - comprehensive features with good PSR support
Critical architectural trade-off:
PSR Compliance vs Developer Experience: Laravel sacrifices compliance for DX; Yii3/Spiral prioritize standards. The choice depends on whether interoperability with PSR ecosystem or framework-specific optimizations matter more for your project.