Skip to content

Recruiter\Concurrency 5.0.0

Choose a tag to compare

@dbellettini dbellettini released this 03 Aug 21:30

✨ New Features

  • Static analysis integration - Added PHPStan level 4 for comprehensive type checking
  • Code modernization - Integrated Rector for automated PHP code upgrades
  • Enhanced Makefile - Added phpstan, rector, and update commands for improved development workflow
  • Composer improvements - Added authors section and enabled package sorting plugin

🛠️ Improvements

  • Strict type declarations - Enhanced all interface methods with proper type hints
  • Better interface design - Leveraged PHP's \Stringable interface for cleaner type system
  • Improved error handling - Added PHPStan ignore annotations for intentional infinite loops
  • Code quality fixes - Applied Rector refactoring rules for modern PHP practices
  • Enhanced test reliability - Replaced manual assertions with expectNotToPerformAssertions() for cleaner tests

📦 Dependencies

Added

  • phpstan/phpstan: ^2.1 - Static analysis tool for type checking
  • rector/rector: ^2.1 - Automated code modernization and refactoring

Updated

  • Enhanced composer.json configuration with sort-packages plugin

🔧 Breaking Changes

  • Interface method signatures - All Lock interface methods now have strict type hints:

    • acquire(int $duration = 360) - duration parameter must be integer
    • release(bool $force = false) - force parameter must be boolean
    • refresh(int $duration = 3600) - duration parameter must be integer
    • wait(int $polling = 30, int $maximumWaitingTime = 3600) - both parameters must be integers
  • Timeout class changes:

    • Timeout::inSeconds(int $timeout, callable|string $waitingFor = '') - timeout must be integer, waitingFor accepts callable or string

🛡️ Security & Quality

  • Static analysis - PHPStan level 4 ensures type safety and catches potential bugs
  • Automated refactoring - Rector configuration maintains code quality standards
  • Stricter type system - Enhanced type hints prevent runtime type errors

📝 Development Experience

  • Configuration files - Added phpstan.neon and rector.php for consistent analysis
  • Docker integration - Static analysis tools work seamlessly with existing Docker setup
  • Makefile commands - Easy access to quality tools via make phpstan and make rector

Full Changelog: v4.0.0...v5.0.0