Skip to content

[4.x] Correct stale deprecation notes and describe unimplemented driver methods - #407

Open
Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-fix-stale-docblocks
Open

Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-fix-stale-docblocks

Conversation

@Hackwar

@Hackwar Hackwar commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Docblocks and runtime messages that contradict the code:

  • Stale removal version. DatabaseDriver::getInstance() and $instances, the name magic property, the $offset/$limit arguments of setQuery() (driver and DatabaseInterface) and DatabaseQuery::dump() are still present in 4.x, but their @deprecated tags and trigger_deprecation() messages announced removal "in 3.0". They now say 5.0, where the removal is planned.
  • Removed interface. The setQuery() docblocks pointed to LimitableInterface::setLimit(), which was removed in 4.0; they now point to QueryInterface::setLimit().
  • Stub implementations. SqliteDriver::getTableCreate() returns the given table names instead of CREATE statements; SqlsrvDriver::connected() always returns true, getCollation()/getConnectionCollation() return a hard-coded 'MSSQL UTF-8 (UCS2)', and getTableCreate()/getTableKeys() return []. The docblocks promised real results; they now describe what the methods actually return. Implementing them (e.g. sqlite_master.sql, a SELECT 1 probe for SQL Server) would be a behaviour change and is left for separate PRs.

Only docblocks and deprecation message texts change; no behaviour change.

Testing Instructions

Nothing to test beyond the existing suites; phpcs and PHPStan pass.

Documentation Changes Required

None on 4.x-dev. #373's update guides already say these APIs survive until 5.0.

🤖 Generated with Claude Code

…hods

The 4.x line still announced the removal of getInstance(), the name
property, the setQuery() offset/limit arguments and DatabaseQuery::dump()
for 3.0, and pointed to the removed LimitableInterface. They now say 5.0
and QueryInterface::setLimit().

Several driver methods are stubs whose docblocks promised real results:
SqliteDriver::getTableCreate() returns the table names, and SqlsrvDriver's
connected(), getCollation(), getConnectionCollation(), getTableCreate() and
getTableKeys() return fixed values. Their docblocks now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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