summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-26 10:23:15 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-26 10:23:15 +0200
commit7c5be1ee6a3c1f699bab9a8a11680c9d13af3817 (patch)
treeb1f635441a3839d9e3b28a2bb4bd15a329c824df /php-bartlett-PHP-Reflect-3.0.0-rpm.patch
parent4ad6a01536450b28c067b9a455bcbcae674fb515 (diff)
rewite autoloader
Diffstat (limited to 'php-bartlett-PHP-Reflect-3.0.0-rpm.patch')
-rw-r--r--php-bartlett-PHP-Reflect-3.0.0-rpm.patch143
1 files changed, 0 insertions, 143 deletions
diff --git a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
deleted file mode 100644
index 80e32f4..0000000
--- a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist
---- ./bin/phpreflect.json.dist.rpm 2015-05-11 12:55:49.000000000 +0200
-+++ ./bin/phpreflect.json.dist 2015-05-11 13:22:14.660514268 +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-06-18 13:30:46.000000000 +0200
-+++ ./bin/phpreflect 2015-06-21 20:10:01.185883366 +0200
-@@ -5,19 +5,35 @@ $appName = 'phpReflect';
- if (\Phar::running()) {
- $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor';
- } else {
-- $baseDir = dirname(__DIR__);
-- $vendorDir = $baseDir . '/vendor';
--
-- if (!file_exists($vendorDir . '/autoload.php')) {
-- $vendorDir = dirname(dirname($baseDir));
-- }
-+ $vendorDir = '/usr/share/php';
-+ putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite');
-
- if (!getenv("BARTLETTRC")) {
- putenv("BARTLETTRC=" . strtolower($appName) . '.json');
- }
- }
--$loader = require_once $vendorDir . '/autoload.php';
--$loader->setUseIncludePath(true);
-+
-+require_once $vendorDir . '/PhpParser/Autoloader.php';
-+PhpParser\Autoloader::register();
-+
-+require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-+require_once $vendorDir . '/SebastianBergmann/Version/autoload.php';
-+
-+use Symfony\Component\ClassLoader\UniversalClassLoader;
-+
-+$loader = new UniversalClassLoader();
-+$loader->registerNamespaces(array(
-+ 'Symfony\\Component' => $vendorDir,
-+ 'Doctrine\\Common' => $vendorDir,
-+ 'phpDocumentor\\Reflection' => $vendorDir,
-+ 'Seld\\JsonLint' => $vendorDir,
-+ 'JsonSchema' => $vendorDir,
-+ 'Psr\\Log' => $vendorDir,
-+ 'Monolog' => $vendorDir,
-+ 'Bartlett' => $vendorDir,
-+));
-+$loader->useIncludePath(true);
-+$loader->register();
-
- if (\Phar::running()) {
- if ($home) {
-@@ -40,5 +56,5 @@ use Bartlett\Reflect\Console\Application
-
- Environment::setScanDir();
-
--$application = new Application($appName, '3.1');
-+$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-05-11 12:55:49.000000000 +0200
-+++ ./src/Bartlett/Reflect/Console/Application.php 2015-05-11 13:22:14.661514273 +0200
-@@ -82,7 +82,7 @@ class Application extends BaseApplicatio
- $jsonFile = './' . getenv("BARTLETTRC");
- }
-
-- parent::__construct($appName, '@package_version@');
-+ parent::__construct($appName, $appVersion);
- $this->release = $appVersion;
-
- $defaultAnalyser = (strcasecmp($appName, 'phpcompatinfo') === 0)
-diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
---- ./tests/bootstrap.php.rpm 2015-05-11 12:55:49.000000000 +0200
-+++ ./tests/bootstrap.php 2015-05-11 13:22:14.661514273 +0200
-@@ -1,11 +1,9 @@
- <?php
-
- $baseDir = dirname(__DIR__);
--$vendorDir = $baseDir . '/vendor';
-+$vendorDir = '/usr/share/php';
-
--$loader = require_once $vendorDir . '/autoload.php';
--$loader->addClassMap(
-- array(
-+$tab = array(
- 'Bartlett\Tests\Reflect\Analyser\FooAnalyser'
- => __DIR__ . '/Analyser/FooAnalyser.php',
- 'Bartlett\Tests\Reflect\Analyser\BarAnalyser'
-@@ -14,5 +12,24 @@ $loader->addClassMap(
- => __DIR__ . '/Model/GenericModelTest.php',
- 'Bartlett\Tests\Reflect\Environment\YourLogger'
- => __DIR__ . '/Environment/YourLogger.php',
-- )
- );
-+require_once $vendorDir . '/PhpParser/Autoloader.php';
-+PhpParser\Autoloader::register();
-+
-+require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-+
-+use Symfony\Component\ClassLoader\UniversalClassLoader;
-+
-+$loader = new UniversalClassLoader();
-+$loader->registerNamespaces(array(
-+ 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests',
-+ 'Bartlett\\UmlWriter' => $vendorDir,
-+ 'Bartlett' => $baseDir . '/src',
-+ 'Monolog' => $vendorDir,
-+));
-+$loader->useIncludePath(true);
-+$loader->register();
-+
-+foreach ($tab as $class => $file) {
-+ require_once $file;
-+}
-diff -up ./tests/Environment/YourLogger.php.rpm ./tests/Environment/YourLogger.php
---- ./tests/Environment/YourLogger.php.rpm 2015-05-11 12:55:49.000000000 +0200
-+++ ./tests/Environment/YourLogger.php 2015-05-11 13:22:14.661514273 +0200
-@@ -14,6 +14,7 @@ class YourLogger extends Logger
- if (!file_exists($tempDir)) {
- mkdir($tempDir, 0755, true);
- }
-+ date_default_timezone_set('UTC');
- $filename = sprintf('phpreflect-%s.log', date('Ymd'));
-
- $stream = new RotatingFileHandler("$tempDir/$filename", 30);