Repository navigation
Schema: preserve released CREATE TABLE override signature - #270
Merged
Merged
Conversation
JJJ
force-pushed
the
fix/schema-create-signature
branch
from
September 22, 2026 21:21
c741da7 to
50925c5
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.
Schema::get_create_table_string( bool $with_foreign_keys = false )rejects subclasses that override the released 3.0.1 zero-argument method: loading such a subclass raises a PHP declaration fatal. Restore the zero-argument signature and haveTable::create()append the existingget_foreign_key_strings()fragments when inline foreign keys are enabled. This preserves subclass dispatch and inline foreign-key SQL without another Schema method.The regression fixture uses a Schema subclass with the released signature and verifies that inline table creation calls its override and emits the foreign key. The changelog and DDL comments now describe the compatible contract.
Validation: PHP 8.1 and 8.2 WordPress 6.7/MariaDB 10.2 suites (1,790 tests, 3,984 assertions each); PHPStan level 8; PHPCS; Composer validation;
git diff --check.