Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge BC break for fetchAssoc and fetchPairs #284

Closed
SendiMyrkr opened this issue Apr 25, 2018 · 1 comment
Closed

Huge BC break for fetchAssoc and fetchPairs #284

SendiMyrkr opened this issue Apr 25, 2018 · 1 comment

Comments

@SendiMyrkr
Copy link
Contributor

SendiMyrkr commented Apr 25, 2018

  • bug report? yes
  • feature request? no
  • version: 4.0.0-RC2

Description

At least fetchAssoc and fetchPairs ignores setResult, following example works for dibi 3, dibi 4 throws "Unknown column 'playerId' in associative descriptor"

Steps To Reproduce

$q = dibi::select('player_id')->from('players');

$q->setupResult('setRowFactory', function(array $row) {
    $line = new \stdClass();
    $line->playerId = $row['player_id'];

    return $line;
});

print_r($q->fetchAssoc('playerId'));
print_r($q->fetchPairs('playerId', 'playerId'));
@dg
Copy link
Owner

dg commented May 1, 2018

Yes, there is actually a BC break here. I did not expect anyone to use RowFactory in this way.

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

No branches or pull requests

2 participants