cakephp / cakephp/phinx

SqlServerAdapter::getColumns returns associative array

Open
#2,386 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug major
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

The SqlServerAdapter::getColumns function returns an associative array of columns, where the keys are column names. All other adapters return a numeric array which is also expressed by our AdapterInterface:

https://github.com/cakephp/phinx/blob/8270c6ec96bb1262c43c5f1ea322b6b4218cac28/src/Phinx/Db/Adapter/AdapterInterface.php#L426-L432

The SqlServerAdapter::getColumns method should be changed to return numeric array. As this is public facing functionality, this will require a major release.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Phinx/Db/Adapter/SqlServerAdapter.php at SqlServerAdapter::getColumns, then compare its return contract with AdapterInterface.php and the other adapters. Confirm the expected numeric-array shape and check the relevant adapter tests if available. Done means the SQL Server adapter matches the interface and the public API change is accounted for in the major-release note.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.