File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed
Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'driver_to_mimic ' => 'mysql ' ,
5+ ];
Original file line number Diff line number Diff line change 66
77class ServiceProvider extends BaseProvider
88{
9+ /**
10+ * Bootstrap the package.
11+ */
912 public function boot ()
1013 {
11- if ($ this ->app ->environment ('testing ' ) && $ this ->app ['db ' ]->getDriverName () == 'sqlite ' ) {
12- (new FunctionRegistrar )->register ($ this ->app ['db ' ]->getPdo (), $ this ->app ['db ' ]->getDefaultConnection ());
13- }
14- }
14+ if ($ this ->app ->runningInConsole ()) {
15+ $ this ->publishes ([
16+ __DIR__ .'/../config/sqlite-functions.php ' => $ this ->app ->configPath (),
17+ ]);
18+ }
19+
20+ $ this ->mergeConfigFrom (__DIR__ .'/../config/sqlite-functions.php ' );
21+
22+ $ this ->registerFunctions ();
23+ }
24+
25+ /**
26+ * Register the functions.
27+ */
28+ protected function registerFunctions (): void
29+ {
30+ if ($ this ->app ->environment ('testing ' ) && $ this ->app ['db ' ]->getDriverName () == 'sqlite ' ) {
31+ (new FunctionRegistrar )->register ($ this ->app ['db ' ]->getPdo (), config ('sqlite-functions.driver_to_mimic ' ));
32+ }
33+ }
1534}
You can’t perform that action at this time.
0 commit comments