blob: 2d92fcdb1eb12eee75d706838c49613333da03a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
diff -up ./bin/doctrine-dbal.php.rpm ./bin/doctrine-dbal.php
--- ./bin/doctrine-dbal.php.rpm 2021-10-04 09:39:41.000000000 +0200
+++ ./bin/doctrine-dbal.php 2021-10-04 09:40:19.300550825 +0200
@@ -1,25 +1,14 @@
+#!/usr/bin/env php
<?php
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
-$files = [__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php'];
-$loader = null;
+require '/usr/share/php/Doctrine/DBAL3/autoload.php';
+
$cwd = getcwd();
$directories = [$cwd, $cwd . DIRECTORY_SEPARATOR . 'config'];
$configFile = null;
-foreach ($files as $file) {
- if (file_exists($file)) {
- $loader = require $file;
-
- break;
- }
-}
-
-if (! $loader) {
- throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
-}
-
foreach ($directories as $directory) {
$configFile = $directory . DIRECTORY_SEPARATOR . 'cli-config.php';
diff -up ./src/Tools/Console/ConsoleRunner.php.rpm ./src/Tools/Console/ConsoleRunner.php
--- ./src/Tools/Console/ConsoleRunner.php.rpm 2021-10-04 09:39:41.000000000 +0200
+++ ./src/Tools/Console/ConsoleRunner.php 2021-10-04 09:41:02.034408249 +0200
@@ -5,7 +5,6 @@ namespace Doctrine\DBAL\Tools\Console;
use Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand;
use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand;
use Exception;
-use PackageVersions\Versions;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
@@ -25,7 +24,7 @@ class ConsoleRunner
*/
public static function run(ConnectionProvider $connectionProvider, $commands = [])
{
- $cli = new Application('Doctrine Command Line Interface', Versions::getVersion('doctrine/dbal'));
+ $cli = new Application('Doctrine Command Line Interface', '@VERSION@');
$cli->setCatchExceptions(true);
self::addCommands($cli, $connectionProvider);
|