Skip to content

fix: preserve cached table list shape#10179

Open
memleakd wants to merge 1 commit intocodeigniter4:developfrom
memleakd:refactor/list-tables-cached-list-shape
Open

fix: preserve cached table list shape#10179
memleakd wants to merge 1 commit intocodeigniter4:developfrom
memleakd:refactor/list-tables-cached-list-shape

Conversation

@memleakd
Copy link
Copy Markdown
Contributor

@memleakd memleakd commented May 9, 2026

Description

Preserves the documented list<string> return shape of BaseConnection::listTables() when returning cached table names.

When a table is dropped, the cached table-name array may become sparse. Returning array_values() from the cached path keeps the result as a proper list, matching the method PHPDoc and the fresh-query path.

This was split out from #10169 after review because it is a small database metadata fix with its own regression coverage.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant