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
53
54
55
|
diff -up ./data/handleDB.php.rpm ./data/handleDB.php
--- ./data/handleDB.php.rpm 2015-12-04 21:15:12.000000000 +0100
+++ ./data/handleDB.php 2015-12-05 16:55:03.461056102 +0100
@@ -12,7 +12,8 @@
* @since Release 1.0.0alpha1 of PHP_CompatInfo_Db
*/
-require_once dirname(__DIR__) . '/vendor/autoload.php';
+require_once '/usr/share/php/Symfony/autoload.php';
+require_once dirname(__DIR__) . '/src/Bartlett/CompatInfoDb/autoload.php';
require_once __DIR__ . '/ReferenceCollection.php';
use Bartlett\CompatInfoDb\ExtensionFactory;
@@ -238,12 +239,7 @@ class DbInitCommand extends Command
array(
'build_string' => date('M d Y H:i:s T', $time),
'build_date' => date('YmdHis', $time),
- 'build_version' => sprintf(
- '%4d.%4d.%6d',
- date('Y', $time),
- date('md', $time),
- date('His', $time)
- )
+ 'build_version' => "@VERSION@"
)
);
$progress->setMessage('Database is built');
diff -up ./src/Bartlett/CompatInfoDb/Environment.php.rpm ./src/Bartlett/CompatInfoDb/Environment.php
--- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2015-12-04 21:15:12.000000000 +0100
+++ ./src/Bartlett/CompatInfoDb/Environment.php 2015-12-05 16:55:03.461056102 +0100
@@ -37,6 +37,12 @@ class Environment
*/
public static function initRefDb()
{
+ if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) {
+ return new \PDO('sqlite:' . $database);
+ } else if (file_exists($database = '/usr/share/php-bartlett-php-compatinfo-db/compatinfo.sqlite')) {
+ return new \PDO('sqlite:' . $database);
+ }
+
$database = 'compatinfo.sqlite';
$tempDir = sys_get_temp_dir() . '/bartlett';
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
--- ./tests/bootstrap.php.rpm 2015-12-05 16:55:03.461056102 +0100
+++ ./tests/bootstrap.php 2015-12-05 16:56:06.693323039 +0100
@@ -1,6 +1,7 @@
<?php
$baseDir = dirname(__DIR__);
-$vendorDir = $baseDir . '/vendor';
+$vendorDir = 'Bartlett/CompatInfoDb'; // tests use include_path
require_once $vendorDir . '/autoload.php';
+require_once __DIR__ . '/Reference/GenericTest.php';
|