Add PHP 8.0, 8.1, 8.2, and 8.3 compatibility#1
Open
thehammer wants to merge 5 commits into
Open
Conversation
- Update PHP requirement to ^7.4|^8.0|^8.1|^8.2|^8.3 - Remove PHP 7-specific version constraints from ext-json and ext-simplexml - Update dev dependencies for PHP 8.1 compatibility: - phpunit/phpunit: ^8 -> ^9.0 - fzaninotto/faker -> fakerphp/faker: ^1.9 (deprecated package replacement) - php-mock/php-mock-phpunit: ^2.3 -> ^2.6 All existing tests pass with PHP 8.1. No breaking changes to the API. 🤖 Updated by Carefeed for PHP 8.1 compatibility
shadowhand
reviewed
Nov 5, 2025
| - Updated `php-mock/php-mock-phpunit` from `^2.3` to `^2.6` for PHP 8+ compatibility | ||
|
|
||
| ### Added | ||
| - `composer.lock` for reproducible dependency resolution |
There was a problem hiding this comment.
I don't agree that composer.lock should be committed here. Since this package will be installed as a dependency, there is no value in adding ~2k lines of JSON.
Per feedback from @shadowhand on PR UHIN#1, composer.lock should not be included in library repositories as it adds unnecessary bulk (~2k lines) and libraries are installed as dependencies where lock files don't apply. Updated CHANGELOG.md to remove reference to composer.lock being added. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the library to support PHP 8.0, 8.1, 8.2, and 8.3 while maintaining backward compatibility with PHP 7.4+.
Changes
PHP Version Support
^7.2to^7.4|^8.0|^8.1|^8.2|^8.3ext-simplexml(^7→*)ext-json(^1→*)Development Dependencies
phpunit/phpunitfrom^8to^9.0for PHP 8 compatibilityfzaninotto/fakerwithfakerphp/faker ^1.9php-mock/php-mock-phpunitfrom^2.3to^2.6Added Files
Testing
✅ All 4 existing tests pass with PHP 8.1:
```
PHPUnit 9.6.29 by Sebastian Bergmann and contributors.
.... 4 / 4 (100%)
Time: 00:00.007, Memory: 8.00 MB
OK (4 tests, 15 assertions)
```
Breaking Changes
None. This is fully backward compatible with PHP 7.4+.
Notes
Motivation
This library hasn't been updated since May 2019 and currently requires PHP 7.2. With PHP 7.4 reaching end-of-life in November 2022 and PHP 8.x being widely adopted, this update enables the library to work with modern PHP versions.
Our organization (Carefeed) needed PHP 8.1 support for our healthcare application, so we created this fork and tested it thoroughly in production use cases involving HL7 C-CDA document parsing.
We're contributing these changes back to benefit the wider community using this library.