Skip to content

Conversation

@tkaratug
Copy link

Summary

This PR adds support for PHP 8.5 while maintaining backward compatibility with PHP 8.2, 8.3, and 8.4.

Motivation

With PHP 8.5 now released, this update ensures Roach stays current with the latest PHP version and allows users to leverage new PHP 8.5 features and improvements in their web scraping projects.

Changes Made

Core Changes

  • ✅ Updated composer.json PHP version constraint to include ~8.5.0
  • ✅ Updated composer.lock with PHP 8.5 compatible dependencies
  • ✅ Added PHP 8.5 to GitHub Actions CI/CD test matrix

Code Quality Improvements

  • 🔧 Fixed PHPStan offsetAccess.invalidOffset error in Item.php
  • 🔧 Removed unnecessary @phpstan-ignore annotation in RequestDeduplicationMiddleware.php

Documentation

  • 📝 Updated CHANGELOG.md with version 3.3.0 entry

Testing

All tests pass successfully on PHP 8.5.0:

  • 502 tests, 808 assertions
  • ✅ PHPStan analysis: No errors
  • ✅ All existing functionality verified

Backward Compatibility

No breaking changes - Full backward compatibility maintained with PHP 8.2, 8.3, and 8.4

Checklist

  • Tests pass on PHP 8.5
  • PHPStan analysis passes
  • CHANGELOG.md updated
  • CI/CD pipeline updated
  • No breaking changes introduced

Add support for PHP 8.5 while maintaining backward compatibility
with PHP 8.2, 8.3, and 8.4.

Changes:
- Update composer.json PHP version constraint to include ~8.5.0
- Update composer.lock with PHP 8.5 compatible dependencies
- Add PHP 8.5 to GitHub Actions CI/CD test matrix
- Fix PHPStan errors (offsetAccess.invalidOffset in Item.php)
- Remove unnecessary phpstan-ignore annotation in RequestDeduplicationMiddleware
- Update CHANGELOG.md for version 3.3.0

All tests passing on PHP 8.5.0 (502 tests, 808 assertions)
- Remove phpstan baseline errors by fixing type safety in Processor
- Add explicit type checks for Request vs ItemInterface in middleware loop
- Replace dynamic method invocation with conditional branches for clarity
- Fix potential false return value handling in RequestDeduplicationMiddleware
- Improve type hints with proper PHPDoc annotations for each branch
- Clear phpstan-baseline.neon as all issues are now resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant