summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-04 15:31:00 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-04 15:31:00 +0200
commit44bcf54c82e292d793816ce67a32fe210574da2c (patch)
tree8b1b1bb449cb138bd152bf7ec65b91c9befbb531
parent9c8e9503416eacf177a25d5bccc6551249eccb14 (diff)
php-bartlett-PHP-Reflect: add cache plugin in default configuration
-rw-r--r--php-bartlett-PHP-Reflect-3.0.0-rpm.patch50
-rw-r--r--php-bartlett-PHP-Reflect.spec11
2 files changed, 46 insertions, 15 deletions
diff --git a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
index b0a8f0f..fe0c321 100644
--- a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
+++ b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
@@ -1,7 +1,30 @@
+diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist
+--- ./bin/phpreflect.json.dist.rpm 2015-04-04 15:15:47.860245093 +0200
++++ ./bin/phpreflect.json.dist 2015-04-04 15:16:37.420443972 +0200
+@@ -6,6 +6,19 @@
+ }
+ ],
+ "plugins": [
++ {
++ "name": "Cache",
++ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin",
++ "options": {
++ "adapter": "DoctrineCacheAdapter",
++ "backend": {
++ "class": "Doctrine\\Common\\Cache\\FilesystemCache",
++ "args": [
++ "%{HOME}/.cache/php-reflect"
++ ]
++ }
++ }
++ }
+ ],
+ "analysers": [
+ ],
diff -up ./bin/phpreflect.rpm ./bin/phpreflect
---- ./bin/phpreflect.rpm 2015-02-19 18:51:08.000000000 +0100
-+++ ./bin/phpreflect 2015-02-22 11:32:38.272052909 +0100
-@@ -1,23 +1,37 @@
+--- ./bin/phpreflect.rpm 2015-04-03 08:47:14.000000000 +0200
++++ ./bin/phpreflect 2015-04-04 15:21:07.510527397 +0200
+@@ -1,23 +1,39 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
@@ -12,12 +35,11 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect
} else {
- $baseDir = dirname(__DIR__);
- $vendorDir = $baseDir . '/vendor';
--
++ putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite');
+
- if (!file_exists($vendorDir . '/autoload.php')) {
- $vendorDir = dirname(dirname($baseDir));
- }
-+ putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite');
-+
+ $vendorDir = '/usr/share/php';
if (!getenv("BARTLETTRC")) {
@@ -41,6 +63,8 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect
+ 'phpDocumentor\\Reflection' => $vendorDir,
+ 'Seld\\JsonLint' => $vendorDir,
+ 'JsonSchema' => $vendorDir,
++ 'Psr\\Log' => $vendorDir,
++ 'Monolog' => $vendorDir,
+ 'Bartlett' => $vendorDir,
+));
+$loader->useIncludePath(true);
@@ -48,7 +72,7 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect
if (PHP_SAPI !== 'cli') {
return;
-@@ -28,5 +40,5 @@ use Bartlett\Reflect\Console\Application
+@@ -28,5 +44,5 @@ use Bartlett\Reflect\Console\Application
Environment::setScanDir();
@@ -56,8 +80,8 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect
+$application = new Application($appName, '@package_version@');
$application->run();
diff -up ./src/Bartlett/Reflect/Console/Application.php.rpm ./src/Bartlett/Reflect/Console/Application.php
---- ./src/Bartlett/Reflect/Console/Application.php.rpm 2015-02-22 11:33:12.102190255 +0100
-+++ ./src/Bartlett/Reflect/Console/Application.php 2015-02-22 11:33:24.298239771 +0100
+--- ./src/Bartlett/Reflect/Console/Application.php.rpm 2015-04-03 08:47:14.000000000 +0200
++++ ./src/Bartlett/Reflect/Console/Application.php 2015-04-04 15:15:24.203150166 +0200
@@ -82,7 +82,7 @@ class Application extends BaseApplicatio
$jsonFile = './' . getenv("BARTLETTRC");
}
@@ -68,8 +92,8 @@ diff -up ./src/Bartlett/Reflect/Console/Application.php.rpm ./src/Bartlett/Refle
$defaultAnalyser = (strcasecmp($appName, 'phpcompatinfo') === 0)
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
---- ./tests/bootstrap.php.rpm 2015-02-19 18:51:08.000000000 +0100
-+++ ./tests/bootstrap.php 2015-02-22 11:31:52.226865970 +0100
+--- ./tests/bootstrap.php.rpm 2015-04-03 08:47:14.000000000 +0200
++++ ./tests/bootstrap.php 2015-04-04 15:15:24.203150166 +0200
@@ -1,11 +1,9 @@
<?php
@@ -111,8 +135,8 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
+ require_once $file;
+}
diff -up ./tests/Environment/YourLogger.php.rpm ./tests/Environment/YourLogger.php
---- ./tests/Environment/YourLogger.php.rpm 2015-02-19 18:51:08.000000000 +0100
-+++ ./tests/Environment/YourLogger.php 2015-02-22 11:31:52.226865970 +0100
+--- ./tests/Environment/YourLogger.php.rpm 2015-04-03 08:47:14.000000000 +0200
++++ ./tests/Environment/YourLogger.php 2015-04-04 15:15:24.203150166 +0200
@@ -14,6 +14,7 @@ class YourLogger extends Logger
if (!file_exists($tempDir)) {
mkdir($tempDir, 0755, true);
diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec
index 3b73a98..dbe2b35 100644
--- a/php-bartlett-PHP-Reflect.spec
+++ b/php-bartlett-PHP-Reflect.spec
@@ -21,7 +21,7 @@
Name: php-bartlett-PHP-Reflect
Version: 3.0.0
-%global specrel 1
+%global specrel 2
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Adds the ability to reverse-engineer PHP
@@ -105,7 +105,10 @@ Requires: php-composer(seld/jsonlint) < 2
Requires: php-composer(justinrainbow/json-schema) >= 1.3
Requires: php-composer(justinrainbow/json-schema) < 2
# "require-dev": {
+# "doctrine/cache": "~1.3",
+# "psr/log": "~1.0",
# "monolog/monolog": "~1.10",
+# "bartlett/phpunit-loggertestlistener": "~1.1",
# "bartlett/umlwriter": "~1.0"
# "suggest": {
# "doctrine/cache": "Allow caching results"
@@ -113,7 +116,8 @@ Requires: php-composer(justinrainbow/json-schema) < 2
# "monolog/monolog": "Allow logging events with the LogPlugin",
# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
-Requires: php-composer(doctrine/cache)
+Requires: php-composer(doctrine/cache) >= 1.3
+Requires: php-composer(psr/log) >= 1.0
%if ! %{bootstrap}
Requires: php-composer(bartlett/umlwriter) >= 1.0
Requires: php-composer(bartlett/umlwriter) < 2
@@ -187,6 +191,9 @@ fi
%changelog
+* Sat Apr 4 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-2
+- add cache plugin in default configuration
+
* Fri Apr 3 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
- update to 3.0.0
- cleanup EL-5 stuff