Skip to content

Releases: recruiterphp/recruiter

Recruiter 5.0.0

08 Aug 23:23

Choose a tag to compare

🚀 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-mongo and alcaeus/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

✨ 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-cs command
    • Rector support for automated code modernization
    • PHPStan static analysis with improved level
  • 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
  • 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 long annotations
    • Improved test reliability and reduced flaky tests
    • Better test isolation and setup/teardown handling
  • 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 - Replaces mtdowling/cron-expression
  • ulrichsg/getopt-php: ^4.0 - CLI argument parsing
  • symfony/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

  1. Update PHP to 8.4+ - Ensure your environment supports PHP 8.4
  2. Update MongoDB setup:
    • Ensure MongoDB extension >=1.15 is installed
    • Remove any alcaeus/mongo-php-adapter dependencies
    • Update mongodb/mongodb to ^2.1
  3. Update Composer dependencies - Run composer update to get all new versions
  4. Update Symfony components - Ensure compatibility with Symfony 7.3 throughout your application
  5. Optional: Use new Docker development environment - make build && make up for local development

Production Migration: The job queue storage format remains unchanged - existing jobs in MongoDB will continue to be processed normally after the upgrade.

Full Changelog

4.2.4...v5.0.0