File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 88 "require" : {
99 "php" : " >=5.6" ,
1010 "kdyby/events" : " ~2.3|~3.0" ,
11- "knplabs/doctrine-behaviors" : " ~1.2.0 " ,
11+ "knplabs/doctrine-behaviors" : " ~1.2" ,
1212 "tracy/tracy" : " ~2.3"
1313 },
1414 "require-dev" : {
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ final class TimestampableExtension extends AbstractBehaviorExtension
2222 */
2323 private $ default = [
2424 'isRecursive ' => TRUE ,
25- 'trait ' => Timestampable::class
25+ 'trait ' => Timestampable::class,
26+ 'dbFieldType ' => 'datetime ' ,
2627 ];
2728
2829
@@ -36,7 +37,8 @@ public function loadConfiguration()
3637 ->setClass (TimestampableSubscriber::class, [
3738 '@ ' . $ this ->getClassAnalyzer ()->getClass (),
3839 $ config ['isRecursive ' ],
39- $ config ['trait ' ]
40+ $ config ['trait ' ],
41+ $ config ['dbFieldType ' ],
4042 ])
4143 ->setAutowired (FALSE )
4244 ->addTag (EventsExtension::TAG_SUBSCRIBER );
@@ -50,6 +52,7 @@ private function validateConfigTypes(array $config)
5052 {
5153 Validators::assertField ($ config , 'isRecursive ' , 'bool ' );
5254 Validators::assertField ($ config , 'trait ' , 'type ' );
55+ Validators::assertField ($ config , 'dbFieldType ' , 'string ' );
5356 }
5457
5558}
You can’t perform that action at this time.
0 commit comments