refactor: remove deprecations in Database#9986
refactor: remove deprecations in Database#9986paulbalandan wants to merge 1 commit intocodeigniter4:4.8from
Database#9986Conversation
0c550da to
1ab0d9a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1ab0d9a to
8a0dbd7
Compare
e9532fe to
7a470bb
Compare
|
After all the fixes to the tests, I realise now why they are failing. if ($this->strictOn !== null) {
if ($this->strictOn) {
$initCommands[] = "sql_mode = CONCAT(@@sql_mode, ',', 'STRICT_ALL_TABLES')";
} else {
$initCommands[] = "sql_mode = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
@@sql_mode,
'STRICT_ALL_TABLES,', ''),
',STRICT_ALL_TABLES', ''),
'STRICT_ALL_TABLES', ''),
'STRICT_TRANS_TABLES,', ''),
',STRICT_TRANS_TABLES', ''),
'STRICT_TRANS_TABLES', '')";
}
}My question now is why are the tests look stricter without this? Are our tests not strict by default? Personally, I like the stricter tests I just fixed. |
When Code that relied on non-strict behavior (e.g., silent truncation, implicit numeric casting) may now receive SQL errors instead of warnings. For compatibility reasons, we have to allow this mode, although I have nothing against changing it to |
|
Well, I have nothing against non-strict mode. For compatibility, yes, I would expect the framework to use non-strict mode but I'm annoyingly surprised the tests are not running strictly. IMO that's counter-intuitive to us promoting to use Anyway, I'll open a PR to backport the fixes here to |
This comment was marked as resolved.
This comment was marked as resolved.
7a470bb to
b83b7f5
Compare
b1a5ec3 to
22feedb
Compare
22feedb to
096180d
Compare
Description
Removes deprecated items in database.
Checklist: