File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+ ## [ 2.2.6] - 2020-05-21
6
+ ### Changed
7
+ - Add support for DateTimeImmutable objects
8
+
5
9
## [ 2.2.5] - 2020-03-22
6
10
### Changed
7
11
- Add support for Laravel 7
Original file line number Diff line number Diff line change 2
2
3
3
namespace Mnabialek \LaravelSqlLogger \Objects \Concerns ;
4
4
5
- use DateTime ;
5
+ use DateTimeInterface ;
6
6
7
7
trait ReplacesBindings
8
8
{
@@ -72,7 +72,7 @@ protected function getNamedParameterRegex($name)
72
72
protected function formatBindings ($ bindings )
73
73
{
74
74
foreach ($ bindings as $ key => $ binding ) {
75
- if ($ binding instanceof DateTime ) {
75
+ if ($ binding instanceof DateTimeInterface ) {
76
76
$ bindings [$ key ] = $ binding ->format ('Y-m-d H:i:s ' );
77
77
} elseif (is_string ($ binding )) {
78
78
$ bindings [$ key ] = str_replace ("' " , "\\' " , $ binding );
You can’t perform that action at this time.
0 commit comments