1 | <?php |
||||
2 | |||||
3 | |||||
4 | declare(strict_types=1); |
||||
5 | |||||
6 | require_once 'Doctrine/Common/ClassLoader.php'; |
||||
7 | |||||
8 | $classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); |
||||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||||
9 | $classLoader->register(); |
||||
10 | |||||
11 | $classLoader = new \Doctrine\Common\ClassLoader('Symfony'); |
||||
0 ignored issues
–
show
The class
Doctrine\Common\ClassLoader has been deprecated: the ClassLoader is deprecated and will be removed in version 3.0 of doctrine/common.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
12 | $classLoader->register(); |
||||
13 | |||||
14 | $configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; |
||||
15 | |||||
16 | $helperSet = null; |
||||
17 | if (file_exists($configFile)) { |
||||
18 | if ( ! is_readable($configFile)) { |
||||
19 | trigger_error( |
||||
20 | 'Configuration file [' . $configFile . '] does not have read permission.', E_USER_ERROR |
||||
21 | ); |
||||
22 | } |
||||
23 | |||||
24 | require $configFile; |
||||
25 | |||||
26 | foreach ($GLOBALS as $helperSetCandidate) { |
||||
27 | if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) { |
||||
28 | $helperSet = $helperSetCandidate; |
||||
29 | break; |
||||
30 | } |
||||
31 | } |
||||
32 | } |
||||
33 | |||||
34 | $helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet(); |
||||
35 | |||||
36 | \Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet); |
||||
37 |