These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /* For licensing terms, see /license.txt */ |
||
3 | |||
4 | /** |
||
5 | * Script needed to execute bin/doctrine.php in the command line |
||
6 | * in order to: |
||
7 | * |
||
8 | * - Generate migrations |
||
9 | * - Create schema |
||
10 | * - Update schema |
||
11 | * - Validate schema |
||
12 | * - Etc |
||
13 | **/ |
||
14 | |||
15 | use Doctrine\ORM\Tools\Console\ConsoleRunner; |
||
16 | |||
17 | require_once __DIR__.'/vendor/autoload.php'; |
||
18 | require_once __DIR__.'/main/inc/lib/api.lib.php'; |
||
19 | $configurationFile = __DIR__.'/app/config/configuration.php'; |
||
20 | |||
21 | if (!is_file($configurationFile)) { |
||
22 | echo "File does not exists: $configurationFile"; |
||
23 | exit(); |
||
24 | } |
||
25 | |||
26 | require_once $configurationFile; |
||
27 | |||
28 | $database = new \Database(); |
||
29 | $dbParams = array( |
||
30 | 'driver' => 'pdo_mysql', |
||
31 | 'host' => $_configuration['db_host'], |
||
32 | 'user' => $_configuration['db_user'], |
||
33 | 'password' => $_configuration['db_password'], |
||
34 | 'dbname' => $_configuration['main_database'], |
||
35 | ); |
||
36 | |||
37 | $database->connect($dbParams, realpath(__DIR__).'/', realpath(__DIR__).'/'); |
||
38 | $entityManager = $database->getManager(); |
||
39 | |||
40 | $helperSet = ConsoleRunner::createHelperSet($entityManager); |
||
41 | $dialogHelper = new Symfony\Component\Console\Helper\DialogHelper(); |
||
0 ignored issues
–
show
|
|||
42 | $helperSet->set($dialogHelper); |
||
43 | |||
44 | return $helperSet; |
||
45 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.