Skip to content

Conversation

bensinclair
Copy link
Member

@bensinclair bensinclair commented Jul 28, 2025

Add PHP 8.1+ support

Summary

This PR upgrades the tithely/exo repository to support PHP versions 8.0 through 8.4+ by:

  1. Updating PHP constraints: Changed from >=7.4 <8.5 to >=8.0 (open-ended, dropping PHP 7.4 support)
  2. Expanding CI matrix: Now tests against PHP 8.0, 8.1, 8.2, 8.3, and 8.4 (previously only 7.4 and 8.0)
  3. Updating dependencies: Updated 28 packages to their latest compatible versions, including PHPUnit 9.5.10 → 9.6.23
  4. Fixing GitHub Actions: Updated deprecated actions/checkout@v2 and actions/cache@v2 to v4
  5. Resolving compatibility issues: Added explicit version constraints for doctrine/instantiator ^1.5 and symfony/deprecation-contracts ^2.4 to maintain PHP 8.0 compatibility

All 20 CI checks now pass across the full PHP version matrix with both MySQL and PostgreSQL databases.

Review & Testing Checklist for Human

  • Test core migration functionality manually across different PHP versions (8.0, 8.2, 8.4) to ensure no regression in actual usage
  • Verify dependency updates don't introduce breaking changes by testing migration creation, execution, and rollback scenarios
  • Check for deprecation warnings when running the library with the updated dependencies, especially PHPUnit and Symfony components
  • Validate that the open-ended PHP constraint aligns with the project's maintenance strategy and ability to support future PHP versions
  • Test edge cases and error handling that may not be covered by the existing test suite (many integration tests require database setup)

Recommended test plan: Set up test databases locally, create sample migrations, and verify they work correctly across PHP 8.0, 8.2, and 8.4 with both MySQL and PostgreSQL.


Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    composer["composer.json<br/>PHP constraints & deps"]:::major-edit
    lock["composer.lock<br/>Dependency versions"]:::major-edit
    ci[".github/workflows/tests.yml<br/>CI matrix & actions"]:::major-edit
    
    deps["Dependencies<br/>(28 packages updated)"]:::context
    phpunit["PHPUnit 9.5.10 → 9.6.23"]:::context
    doctrine["doctrine/instantiator<br/>2.0.0 → 1.5.0"]:::context
    symfony["symfony/deprecation-contracts<br/>v3.6.0 → v2.5.4"]:::context
    
    composer --> deps
    composer --> doctrine
    composer --> symfony
    lock --> phpunit
    ci --> "PHP 8.0-8.4 testing"
    
    subgraph Legend
        L1["Major Edit"]:::major-edit
        L2["Minor Edit"]:::minor-edit  
        L3["Context/No Edit"]:::context
    end

classDef major-edit fill:#90EE90
classDef minor-edit fill:#87CEEB
classDef context fill:#FFFFFF
Loading

Notes

  • Session details: Requested by Ben Sinclair (@bensinclair) - Devin session
  • Breaking change: Drops PHP 7.4 support (now requires PHP 8.0+)
  • Dependency management: The manual addition of version constraints for doctrine/instantiator and symfony/deprecation-contracts was necessary to prevent PHP 8.1+ dependencies from breaking PHP 8.0 compatibility
  • Test limitations: Local test suite shows 21 failures due to missing tests/db.yml configuration, so CI validation is critical for database-dependent functionality

- Update composer.json to support PHP versions 7.4 through 8.4
- Update CI workflow to test against PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4
- Update composer.lock to reflect new PHP version constraints

Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@bensinclair
Copy link
Member Author

Please address this error in all the Github actions tests.

Error: This request has been automatically failed because it uses a deprecated version of actions/cache: v2. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

devin-ai-integration bot and others added 4 commits July 28, 2025 23:25
- Update actions/checkout from v2 to v4
- Update actions/cache from v2 to v4
- Resolves CI failure due to deprecated action versions

Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
@bensinclair
Copy link
Member Author

I remove the explicit PHP version from composer.json (see 3ebbec9) and need you to update composer.

@bensinclair bensinclair changed the title Add PHP 8.1-8.4 support [BREAKING] Add PHP 8.1-8.4 support (drops PHP 7.4) Jul 28, 2025
devin-ai-integration bot and others added 2 commits July 28, 2025 23:42
Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
…ymfony/deprecation-contracts

Co-Authored-By: Ben Sinclair <ben.sinclair@yourgiving.co>
@bensinclair bensinclair requested review from Copilot and joshmcrae July 28, 2025 23:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the PHP version support by dropping PHP 7.4 and adding support for PHP 8.1-8.4. The main driver was resolving a dependency conflict with phpspec/prophecy that prevented PHP 8.2+ usage.

  • Upgraded minimum PHP requirement from 7.4 to 8.0 and added support through 8.4
  • Resolved phpspec/prophecy dependency constraint blocking PHP 8.2+
  • Updated CI matrix to test all supported PHP versions with MySQL and PostgreSQL

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
composer.json Updated PHP requirement to >=8.0, added explicit phpspec/prophecy ^1.22.0 and additional dev dependencies
.github/workflows/tests.yml Expanded CI matrix to test PHP 8.0-8.4 and updated GitHub Actions to v4

@bensinclair bensinclair changed the title [BREAKING] Add PHP 8.1-8.4 support (drops PHP 7.4) [BREAKING] Add PHP 8.1+ support (drops PHP 7.4) Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant