File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717use TapestryCloud \Database \Hydrators \File as FileHydrator ;
1818
1919class Exporter {
20-
21- /**
22- * @var Connection
23- */
24- private $ connection ;
25-
2620 /**
2721 * @var EntityManagerInterface|EntityManager
2822 */
2923 private $ entityManager ;
3024
3125 /**
3226 * Exporter constructor.
33- * @param Connection $connection
3427 * @param EntityManagerInterface $entityManager
3528 * @throws \Exception
3629 */
37- public function __construct (Connection $ connection , EntityManagerInterface $ entityManager )
30+ public function __construct (EntityManagerInterface $ entityManager )
3831 {
39- $ this ->connection = $ connection ;
40- if (!$ this ->connection ->connect ()) {
41- throw new \Exception ('Unable to connect to database ' );
42- }
43-
44- $ tables = $ this ->connection ->getSchemaManager ()->listTables ();
45-
46- $ migrator = new Migrator ($ this ->connection );
47- if (count ($ tables ) < $ migrator ->tables ()) {
48- //$migrator->migrate();
49- }
50-
5132 $ this ->entityManager = $ entityManager ;
5233 }
5334
@@ -77,6 +58,5 @@ public function export(Project $project) {
7758
7859 $ contentTypeSync = new ContentTypes ($ this ->entityManager );
7960 $ contentTypeSync ->sync ($ contentTypes , $ environment );
80-
8161 }
8262}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments