Skip to content

dba_list() is now zero-indexed instead of using resource ids #16990

Closed
@alexandre-daubois

Description

@alexandre-daubois

Description

While adding new casters to Symfony, we came across a 8.4 regression. The following code:

<?php

$dba = dba_open('test.db', 'c');
var_dump(dba_list());

Resulted in this output:

array(1) {
  [0]=>
  string(52) "/Users/mac-ADAUBO01/PhpstormProjects/symfony/test.db"
}

But I expected this output instead:

array(1) {
  [52] =>
  string(52) "/Users/mac-ADAUBO01/PhpstormProjects/symfony/test.db"
}

Works fine on PHP 8.3.14. This makes it not possible to gather information with dba_list() by casting the resource/Dba\Connection to integer.

PHP Version

PHP 8.4.1

Operating System

macOS 15.1.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions