File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Doctrine \ORM \EntityManagerInterface ;
4+ use Doctrine \ORM \Tools \Console \ConsoleRunner ;
5+ use Symfony \Component \Console \Input \ArrayInput ;
6+ use Tapestry \Console \DefaultInputDefinition ;
7+ use Tapestry \Entities \Configuration ;
8+ use Tapestry \Tapestry ;
9+
10+ // replace with file to your own project bootstrap
11+ require_once 'vendor/autoload.php ' ;
12+
13+ $ definitions = new DefaultInputDefinition ();
14+ $ tapestry = new Tapestry (new ArrayInput ([
15+ '--site-dir ' => __DIR__ . DIRECTORY_SEPARATOR . 'mock_project ' ,
16+ '--env ' => 'cli-config '
17+ ], $ definitions ));
18+
19+ $ tapestry ->register (\TapestryCloud \Database \ServiceProvider::class);
20+
21+ /** @var Configuration $configuration */
22+ $ configuration = $ tapestry ->getContainer ()->get (Configuration::class);
23+ $ configuration ->merge (include __DIR__ . '/tests/mock_project/config.php ' );
24+
25+ return ConsoleRunner::createHelperSet ($ tapestry ->getContainer ()->get (EntityManagerInterface::class));
You can’t perform that action at this time.
0 commit comments