Repository navigation
Compatibility: preserve key subclass contracts and operator names - #271
Merged
Merged
Conversation
JJJ
force-pushed
the
fix/released-declaration-fatals
branch
3 times, most recently
from
September 22, 2026 23:28
9ab582b to
da8a3d3
Compare
JJJ
force-pushed
the
fix/released-declaration-fatals
branch
from
September 22, 2026 23:37
da8a3d3 to
0e012a5
Compare
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.
Released 3.0.1 subclasses could fail at declaration time when 3.1 changed several extension signatures. Code extending the released comparison-operator class names also failed to autoload after those classes moved under
Operators\Comparisons.This change retains aliases for all 18 released comparison-operator class names and removes newly added native return types from selected released extension methods. Regression tests cover those contracts.
Three 3.1 signature changes remain intentional:
parse_args()is now an array helper with optional$defaults. Subclasses overriding the 3.0 construction hook must rename that override toconsume_args()before upgrading. A remaining one-argument override causes a PHP declaration fatal.Column::is_*()predicates now accept an optional type argument. Subclasses overriding them must add that optional parameter before upgrading, or PHP rejects the subclass declaration.Column::get_name_sql()now accepts an optional$castargument directly. Subclasses overriding it must add that optional parameter before upgrading, or PHP rejects the subclass declaration.The changelog documents these migrations. An audit of the known BerlinDB consumer repositories found no downstream overrides of these signature families; private consumers may still need to update.
Validation: local PHP 8.1 and 8.2 / WordPress 6.7 / MariaDB 10.2 full suites (1,792 tests, 4,028 assertions each), PHPStan level 8, PHPCS, and
git diff --check. The latestget_name_sql()update passed the PHP 8.2 / MariaDB 10.2 full suite and local static checks.