Add DBAL Schema wrapper in OCP - #63013
Open
CarlSchwan wants to merge 5 commits into
Open
Conversation
CarlSchwan
marked this pull request as ready for review
August 7, 2026 10:14
CarlSchwan
requested review from
a team,
ChristophWurst,
blizzz,
miaulalala and
nickvergessen
as code owners
August 7, 2026 10:14
CarlSchwan
requested review from
leftybournes,
nfebe,
provokateurin and
salmart-dev
and removed request for
a team
August 7, 2026 10:14
come-nc
reviewed
Aug 7, 2026
come-nc
left a comment
Contributor
There was a problem hiding this comment.
Changing return type of getTable is breaking API, no?
CarlSchwan
force-pushed
the
carl/dbal-wrapper
branch
from
August 7, 2026 10:40
5aab27c to
054d3f5
Compare
Member
Author
It's a consumable API so it should be fine as long as the returned object behaves the same as before |
ChristophWurst
left a comment
Member
There was a problem hiding this comment.
Public API looks sane 👍
We could improve the strictness but that will break existing code
| * @throws SchemaException | ||
| * @since 35.0.0 | ||
| */ | ||
| public function addIndex(array $columnNames, ?string $indexName = null, array $flags = [], array $options = []): self; |
Member
There was a problem hiding this comment.
BC break but in terms of typing it would be nicer if this method takes an IIndex with its typed setters instead
Member
Author
There was a problem hiding this comment.
I'm trying my best to not have BC breaks. Maybe we can add another method called createIndex which take a IIndex. and deprecate this addIndex method.
Same as the DBAL one aside that Column::getType returns a string instead of a DBAL Type. Column::setType support both a DBAL Type and a string. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Prefer the fully typed methods instead and there is always the __call magic method as fallback for apps. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
CarlSchwan
force-pushed
the
carl/dbal-wrapper
branch
from
August 7, 2026 13:32
8179785 to
fe68908
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.
Summary
Same as the DBAL one aside that Column::getType returns a string instead of a DBAL Type. Column::setType support both a DBAL Type and a string.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)