Download the PHP package highperapp/container without Composer
On this page you can find all versions of the php package highperapp/container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download highperapp/container
More information about highperapp/container
Files in highperapp/container
Package container
Short Description High-performance PSR-11 container
License MIT
Homepage https://github.com/highperapp/container
Informations about the package container
HighPer DI Container
Standalone high-performance PSR-11 container for any PHP project. Can be used independently or integrated with HighPer framework. Features object pooling, memory optimization, and zero-overhead service resolution.
๐ Features
โก Build-Time Compilation
- ContainerCompiler: Compile service definitions to optimized PHP code
- O(1) Resolution: Zero-overhead service lookups in production
- Dependency Analysis: Compile-time dependency validation
- Cache Generation: Persistent compiled container caching
๐ฏ Performance Optimizations
- PSR-11 Compatible: Fully compliant with PSR-11 Container Interface
- Object Pooling: Advanced object pool for memory optimization
- C10M Ready: Optimized for extreme concurrency scenarios
- Auto-wiring: Lightning-fast automatic dependency injection
- Memory Efficient: Real-time memory usage tracking and optimization
- Framework Agnostic: Works standalone or integrates seamlessly with any framework
- HighPer Framework: First-class integration with HighPer framework
Installation
Usage Scenarios
๐ง Standalone Library
Use in any PHP project (Laravel, Symfony, CodeIgniter, or vanilla PHP):
๐๏ธ HighPer Framework Integration
Automatically available as the default container in HighPer framework with enhanced features and zero configuration.
Quick Start
Advanced Usage
Service Binding
Aliases
Auto-wiring
The container automatically resolves constructor dependencies:
Memory Optimization
Configuration
The container is designed to work out of the box with zero configuration, but you can customize the object pool:
๐งช Testing
Run Container Tests
Test Coverage
- Container Core: Complete PSR-11 functionality
- Build-Time Compilation: Compiler validation and performance
- Framework Integration: HighPer Framework compatibility
- Memory Optimization: Object pooling and memory efficiency
๐ Performance Benchmarks
Performance Metrics
Operation | Speed |
---|---|
Service Resolution | <0.001ms |
Compilation | 50 services/sec |
Memory Usage | <5MB for 100 services |
Dependency Injection | Instant |
Build-Time Compilation Benefits
- Production Speed: Compiled containers eliminate runtime overhead
- Dependency Validation: Catch dependency issues at build time
- Memory Efficiency: Optimized service instantiation patterns
- Cache Performance: Persistent compiled container storage
- Framework Agnostic: Same performance benefits in any environment
โจ Major Features
- ContainerCompiler: Build-time compilation for maximum performance
- Enhanced Object Pooling: Advanced memory management strategies
- Standalone Library: Use in any PHP project without framework dependencies
- Framework Integration: Optional deep integration with HighPer Framework
- Performance Monitoring: Real-time container performance metrics
๐ Performance Improvements
- 40-60% Faster Resolution: Optimized service lookup algorithms
- Build-Time Validation: Catch errors before production
- Memory Optimization: Reduced memory footprint and leaks
- Caching Strategy: Intelligent compiled container caching
๐ง Requirements
- PHP: 8.3+ (8.4 recommended for latest optimizations)
- Extensions: OPcache (recommended), APCu (optional)
- Memory: 64MB+ for compilation, minimal for runtime
- Framework: Any PHP framework or standalone (HighPer Framework integration optional)
๐ค Contributing
This container serves both standalone and HighPer framework users:
- Fork the repository
- Create feature branch (
git checkout -b feature/container-feature
) - Run tests (
composer test
) - Ensure compatibility with both standalone and framework usage
- Commit changes (
git commit -m 'Add container feature'
) - Push to branch (
git push origin feature/container-feature
) - Open Pull Request
๐ License
MIT License - see the LICENSE file for details.
HighPer DI Container - Standalone library with build-time compilation for any PHP project