Releases: recruiterphp/recruiter
Releases · recruiterphp/recruiter
Recruiter 5.0.0
🚀 Breaking Changes
- BREAKING: Minimum PHP version upgraded from 7.2 to 8.4
- BREAKING: MongoDB extension requirement upgraded from >=1.1 to >=1.15
- BREAKING: Removed support for legacy
ext-mongoandalcaeus/mongo-php-adapter - BREAKING: Changed package type from
"project"to"library"for better Composer integration - BREAKING: Major dependency upgrades requiring application updates:
- MongoDB:
^1.4→^2.1(requires MongoDB driver 1.15+) - Symfony Console:
^4.2→^7.3 - Symfony Event Dispatcher:
^3.4|^4.0→^7.3 - Monolog:
>=1→^3.9 - PSR Log:
^1.0→^3.0 - Concurrency:
^3.0→^5.0 - Geezer:
^5→^7.0
- MongoDB:
✨ New Features
- Modern PHP 8.4 Support with strict typing throughout the codebase
- Enhanced Development Environment:
- Complete Docker setup with MongoDB and PHP containers
- GitHub Actions CI with automated testing and multi-PHP version support
- Comprehensive Makefile with development commands (
build,up,test,shell, etc.)
- Code Quality Tools:
- PHP-CS-Fixer configuration with
make fix-cscommand - Rector support for automated code modernization
- PHPStan static analysis with improved level
- PHP-CS-Fixer configuration with
- Improved MongoDB URI Handling with
URI::fromEnvironment()method
🛠️ Improvements
- Complete Code Modernization:
- Added
declare(strict_types=1)across all files - Enhanced type hints and return type declarations
- Converted to modern PHP 8.4 syntax and features
- Improved error handling and exception types
- Added
- Enhanced Job Queue System:
- Better retry policy handling with improved type safety
- Enhanced job repository with modernized MongoDB queries
- Improved worker process management with better memory handling
- Testing Infrastructure:
- Separated long-running endurance tests with
@group longannotations - Improved test reliability and reduced flaky tests
- Better test isolation and setup/teardown handling
- Separated long-running endurance tests with
- Developer Experience:
- Updated examples with modern PHP syntax
- Better CLI command structure and help text
- Enhanced error messages and debugging information
📦 Dependencies
New Dependencies:
dragonmantank/cron-expression: ^3.4- Replacesmtdowling/cron-expressionulrichsg/getopt-php: ^4.0- CLI argument parsingsymfony/var-dumper: ^7.3- Development debugging
Updated Dependencies:
- All Symfony components upgraded to v7.3
- MongoDB driver and library to latest versions
- All development tools updated to latest stable versions
🔧 API Changes
The core job queue API remains backward compatible - existing job classes and worker code should continue to work without changes after updating PHP and dependencies.
Environment Configuration:
// New: Auto-detect MongoDB URI from environment
$uri = URI::fromEnvironment(); // Reads MONGODB_URI env var
// Existing code continues to work unchanged
$recruiter = new Recruiter($mongoClient);
$recruiter->hire(new MyJob($data));Enhanced Type Safety:
All method signatures now include proper type hints and return types, providing better IDE support and catching errors at development time.
🔄 Migration Guide
- Update PHP to 8.4+ - Ensure your environment supports PHP 8.4
- Update MongoDB setup:
- Ensure MongoDB extension >=1.15 is installed
- Remove any
alcaeus/mongo-php-adapterdependencies - Update
mongodb/mongodbto^2.1
- Update Composer dependencies - Run
composer updateto get all new versions - Update Symfony components - Ensure compatibility with Symfony 7.3 throughout your application
- Optional: Use new Docker development environment -
make build && make upfor local development
Production Migration: The job queue storage format remains unchanged - existing jobs in MongoDB will continue to be processed normally after the upgrade.