-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
An error occurs in set_attribute when using PDO SQLSRV #12038
Comments
I don't think we should be monkey patching around a database driver, even though in some sense, the previous PR was monkey patching the MySQL driver. But this has good reasons, as the MySQLnd driver supports differing behaviour. That PDO attribute has existed since at least PHP 5.3, and was probably somewhat of a bug to not propagate this down to the underlying driver. Moreover, there might be reasons for the underlying driver to actually warn/throw. I don't understand why we should be monkey patching when seemingly the only thing preventing this issue to be fixed is for a multi-billion corporation to release a new version of their driver without doing any work as you provided the fix. People who are affected by this should be pressuring Microsoft in releasing a new driver, not pressuring us. |
@Girgias
Yes, honestly I completely agree. I haven't heard back from the PDO SQLSRV lead yet, so I'll wait for his response first. Thank you for your precious time. |
I am closing this issue and the associated PR. |
Description
The following code:
Resulted in this output:
A change here is triggering the error.
#11622
The essence of the problem is that
PDO SQLSRV
is throwing an error instead of returningfalse
whenset_attribute
fails.microsoft/msphpsql#1468
laravel/framework#47937
I've been working on this issue for about 20 days now and the hotfix for
PDO SQLSRV
has not yet been released and things are looking a little shady.However, since there are many people who are in trouble, I thought about creating a PR for a workaround with php-src. What do you think?
#12039
remarks:
I've checked all the PDO drivers provided by PECL and found that only one,
PDO SQLSRV
, gives an error under the same conditions.PHP Version
PHP 8.1.22+, 8.2.9+, 8.3.0+
Operating System
No response
The text was updated successfully, but these errors were encountered: