55use Illuminate \Console \Command ;
66use Illuminate \Support \Facades \Facade ;
77use Statamic \Console \RunsInPlease ;
8- use Statamic \Contracts \Entries \CollectionRepository as CollectionRepositoryContract ;
9- use Statamic \Contracts \Entries \Entry as EntryContract ;
108use Statamic \Contracts \Entries \EntryRepository as EntryRepositoryContract ;
11- use Statamic \Eloquent \Entries \Entry as EloquentEntry ;
129use Statamic \Facades \Entry ;
13- use Statamic \Stache \Repositories \CollectionRepository ;
1410use Statamic \Stache \Repositories \EntryRepository ;
1511use Statamic \Statamic ;
1612
@@ -47,12 +43,8 @@ public function handle(): int
4743 private function useDefaultRepositories (): void
4844 {
4945 Facade::clearResolvedInstance (EntryRepositoryContract::class);
50- Facade::clearResolvedInstance (CollectionRepositoryContract::class);
5146
5247 Statamic::repository (EntryRepositoryContract::class, EntryRepository::class);
53- Statamic::repository (CollectionRepositoryContract::class, CollectionRepository::class);
54-
55- app ()->bind (EntryContract::class, app ('statamic.eloquent.entries.entry ' ));
5648 }
5749
5850 private function importEntries (): void
@@ -71,7 +63,7 @@ private function importEntries(): void
7163 $ this ->withProgressBar ($ entriesWithoutOrigin , function ($ entry ) {
7264 $ lastModified = $ entry ->fileLastModified ();
7365
74- $ entry = EloquentEntry ::makeModelFromContract ($ entry )
66+ ( app ()-> has ( ' statamic.eloquent.entries. entry' ) ? app ( ' statamic.eloquent.entries.entry ' ) : \ Statamic \ Eloquent \ Entries \Entry) ::makeModelFromContract ($ entry )
7567 ->fill (['created_at ' => $ lastModified , 'updated_at ' => $ lastModified ])
7668 ->save ();
7769 });
@@ -82,7 +74,7 @@ private function importEntries(): void
8274 $ this ->withProgressBar ($ entriesWithOrigin , function ($ entry ) {
8375 $ lastModified = $ entry ->fileLastModified ();
8476
85- EloquentEntry ::makeModelFromContract ($ entry )
77+ ( app ()-> has ( ' statamic.eloquent.entries.entry ' ) ? app ( ' statamic.eloquent.entries.entry ' ) : \ Statamic \ Eloquent \ Entries \Entry) ::makeModelFromContract ($ entry )
8678 ->fill (['created_at ' => $ lastModified , 'updated_at ' => $ lastModified ])
8779 ->save ();
8880 });
0 commit comments