Commit Graph

8 Commits

Author SHA1 Message Date
Steve Boyd
620c1b0469 ENH Use class name instead of self 2024-06-18 09:37:39 +12:00
Guy Sartorelli
5854ce6190
Merge branch '4.13' into 5.0 2023-07-10 14:29:03 +12:00
Dylan Wagstaff
8c3ba81052
FIX PHP 8.1 support in MySQLiConnector::query errors (#10570)
* FIX PHP 8.1 support in MySQLiConnector::query errors

The default error reporting mode in PHP 8.1 has changed from using
errors reported on the connection handle to throwing
mysqli_sql_exception. query() makes no allowance for this, and
functions up the call stack expect to catch
Silverstripe\ORM\Connect\DatabaseException instead - resulting in the
MySQLi exception going all the way up to halt the system.

We can use a try, catch, and finally to retain backwards compatibility,
no matter which setting (e.g. PHP version default) someone has enabled.

* Move MySQLConnector test skip call into setUp()

As review feedback; marking the test as skipped in a private function
obfuscated where the call was happening and made it harder to skimread
the tests. Moving this into a setUp function makes it obvious the check
is run before each test case, and skipped if necessary.
2023-07-07 15:56:31 +12:00
Guy Sartorelli
03b929dd33
API Remove support for PDO (#10499) 2022-09-15 13:13:48 +12:00
Steve Boyd
ec5b94facf MNT Update utf8 aliases for mysql 8 and mariadb 10.6 2022-05-26 12:06:51 +12:00
Steve Boyd
511b3bb060 ENH PHP 8.1 compatibility 2022-04-14 13:12:59 +12:00
Garion Herman
099ee2deb7 FIX Remove extraneous @depends annotations 2020-09-15 17:40:42 +12:00
Serge Latyntcev
f57d5cc807 ENH Test coverage for MySQL connection collation 2020-08-30 13:21:38 +12:00