diff options
author | Remi Collet <remi@remirepo.net> | 2019-01-04 09:21:12 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-01-04 09:21:12 +0100 |
commit | a75febd64858a98fd72b63206cd0d6822da50a35 (patch) | |
tree | 7f89fc5b4ba5a75fccb76fdbcbc9bd30427568d6 /php-bartlett-php-compatinfo-db-2.0-rpm.patch | |
parent | d4eecf050c75fa9dcc087f1fc341a2462f1cdc83 (diff) |
update to 2.0.0RC1
bump dependency on PHP 7.1
add dependency on symfony/console 3 or 4
add dependency on league/tactician
add dependency on zendframework/zenddiagnostics
add php-bartlett-php-compatinfo-db command
Diffstat (limited to 'php-bartlett-php-compatinfo-db-2.0-rpm.patch')
-rw-r--r-- | php-bartlett-php-compatinfo-db-2.0-rpm.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/php-bartlett-php-compatinfo-db-2.0-rpm.patch b/php-bartlett-php-compatinfo-db-2.0-rpm.patch new file mode 100644 index 0000000..9912fb1 --- /dev/null +++ b/php-bartlett-php-compatinfo-db-2.0-rpm.patch @@ -0,0 +1,78 @@ +diff -up ./bin/compatinfo-db.rpm ./bin/compatinfo-db +--- ./bin/compatinfo-db.rpm 2018-12-31 15:15:21.000000000 +0100 ++++ ./bin/compatinfo-db 2019-01-04 08:23:55.037657122 +0100 +@@ -7,10 +7,7 @@ declare(strict_types=1); + gc_disable(); // performance boost + + $possibleAutoloadPaths = [ +- // local dev repository +- __DIR__ . '/../vendor/autoload.php', +- // dependency +- __DIR__ . '/../../../../vendor/autoload.php', ++ '/usr/share/php/Bartlett/CompatInfoDb/autoload.php', + ]; + + $isAutoloadFound = false; +diff -up ./src/DatabaseFactory.php.rpm ./src/DatabaseFactory.php +--- ./src/DatabaseFactory.php.rpm 2018-12-31 15:15:21.000000000 +0100 ++++ ./src/DatabaseFactory.php 2019-01-04 08:24:55.740977613 +0100 +@@ -35,14 +35,13 @@ class DatabaseFactory + + private static function getSqliteDsn() : array + { +- if (PATH_SEPARATOR == ';') { +- // windows +- $userHome = getenv('USERPROFILE'); ++ if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) { ++ static::$tempDir = dirname($db); ++ } else if (file_exists($db = '/usr/share/php-bartlett-php-compatinfo-db/' . static::$database)) { ++ static::$tempDir = dirname($db); + } else { +- // unix +- $userHome = getenv('HOME'); +- } +- static::$tempDir = $userHome . '/.bartlett'; ++ static::$tempDir = dirname(dirname(dirname(__DIR__))) . '/data'; ++ } + + return [ + 'driver' => 'pdo_sqlite', +@@ -58,19 +57,6 @@ class DatabaseFactory + { + $dbParams = self::getSqliteDsn(); + +- if (!file_exists(static::$tempDir)) { +- mkdir(static::$tempDir); +- } +- $source = dirname(__DIR__) . '/data/' . static::$database; +- $dest = static::$tempDir . '/' . static::$database; +- +- if (!file_exists($dest) +- || sha1_file($source) !== sha1_file($dest) +- ) { +- // install DB only if necessary (missing or modified) +- copy($source, $dest); +- } +- + return new PDO($dbParams['url']); + } +-} +\ Pas de fin de ligne à la fin du fichier ++} +diff -up ./src/Presentation/Console/Application.php.rpm ./src/Presentation/Console/Application.php +--- ./src/Presentation/Console/Application.php.rpm 2018-12-31 15:15:21.000000000 +0100 ++++ ./src/Presentation/Console/Application.php 2019-01-04 08:23:55.040657137 +0100 +@@ -47,12 +47,7 @@ class Application extends \Symfony\Compo + + public function __construct(string $name = 'UNKNOWN') + { +- try { +- $version = \Jean85\PrettyVersions::getVersion('bartlett/php-compatinfo-db')->getPrettyVersion(); +- } catch (\OutOfBoundsException $e) { +- $version = 'UNKNOWN'; +- } +- parent::__construct($name, $version); ++ parent::__construct($name, '@VERSION@'); + + $this->baseDir = dirname(dirname(dirname(__DIR__))); + } |