yiisoft / yiisoft/db

Support integer keys in query parameters

Open
#1,123 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:docs
Dominant language
PHP
Stars
216
Forks
51
Avg merge
3d 10h
Merged PRs (30d)
2

Description

According to interface method description, there are no integer keys:

@param array $params The list of query parameter values indexed by parameter placeholders.
     * For example, `[':name' => 'Dan', ':age' => 31]`.

If it's true, we should throw exception on int keys.
If it's false, we should update interface phpdoc.

Would it be a mixed array with both int and string keys?

Originally posted by @vjik in https://github.com/yiisoft/db/pull/1116#discussion_r2578343478

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 by reading the interface method description for the $params argument and tracing how query parameter keys are handled. Determine whether integer keys are supported or rejected, then align the documented contract and behavior; the issue names no file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.