Change the signature of odbc_connect

php.internals

Saki Takamachi

2 years ago
Hi, internals I'm currently working on renovating odbc_connect and odbc_pconnect. https://github.com/php/php-src/pull/12306 As a problem came up, I'm planning to create an RFC. I explain the problem briefly. In addition to the dsn, these functions have a credential argument. They are required and expect string. The following two cases are problematic here. 1. If the password is set to a blank character ('') 2. For authentication that does not require a password Since the current signature does not allow nulls, we cannot separate the handling of these cases and must give up on one of them. Therefore, I am thinking of changing the credential argument to be nullable and optional for these functions, like pdo. What do you think? Best regards. Saki

Saki Takamachi

2 years ago
Hi Do you think this requires an RFC in the first place? If there are no objections after waiting for a while, I will submit a pull request without creating an RFC. Regards. Saki

Máté Kocsis

2 years ago
Hi Saki, In my opinion, this is a simple and useful bugfix + nice consistency improvement with negligible backward compatibility break, so I don't think it needs any vote. Regards, Máté

Saki Takamachi

2 years ago
Hi, Máté Thank you for your feedback! After seeing your email, I decided to start implementing it. I have already created a pull request for a bug fix that does not require a signature change, and I plan to update it. Regards. Saki