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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
diff -up ./bin/apigen.rpm ./bin/apigen
--- ./bin/apigen.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./bin/apigen 2017-05-16 09:15:18.037164467 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-require __DIR__ . '/bootstrap.php';
+require '/usr/share/php/ApiGen/autoload.php';
// Create temp dir
@@ -26,8 +26,8 @@ if (isset($_SERVER['argv']) && ($tmp = a
$configurator = new Nette\Configurator;
$configurator->setDebugMode( ! Tracy\Debugger::$productionMode);
$configurator->setTempDirectory($tempDir);
-$configurator->addConfig(__DIR__ . '/../src/DI/config.neon');
-$configurator->addParameters(['rootDir' => __DIR__ . '/..']);
+$configurator->addConfig('/usr/share/php/ApiGen/DI/config.neon');
+$configurator->addParameters(['rootDir' => '/usr/share/php/ApiGen']);
$container = $configurator->createContainer();
diff -up ./src/autoload.php.rpm ./src/autoload.php
--- ./src/autoload.php.rpm 2017-05-16 09:15:18.038164473 +0200
+++ ./src/autoload.php 2017-05-16 09:21:57.811521075 +0200
@@ -0,0 +1,26 @@
+<?php
+// Autoloader for apigen/apigen and its dependencies
+
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('ApiGen\\', __DIR__);
+
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php/Symfony/Component/OptionsResolver/autoload.php',
+ '/usr/share/php/Symfony/Component/Console/autoload.php',
+ '/usr/share/php/Symfony/Component/Yaml/autoload.php',
+ '/usr/share/php/TokenReflection/autoload.php',
+ '/usr/share/php/Michelf/markdown-autoload.php',
+ '/usr/share/php/Nette/Application/autoload.php',
+ '/usr/share/php/Nette/Bootstrap/autoload.php',
+ '/usr/share/php/Nette/DI/autoload.php',
+ '/usr/share/php/Nette/Neon/autoload.php',
+ '/usr/share/php/Nette/Mail/autoload.php',
+ '/usr/share/php/Nette/RobotLoader/autoload.php',
+ '/usr/share/php/Nette/SafeStream/autoload.php',
+ '/usr/share/php/Latte/autoload.php',
+ '/usr/share/php/Tracy/autoload.php',
+ '/usr/share/php/FSHL/autoload.php',
+ '/usr/share/php/Kdyby/Events/autoload.php',
+));
+
diff -up ./src/Configuration/ConfigurationOptionsResolver.php.rpm ./src/Configuration/ConfigurationOptionsResolver.php
--- ./src/Configuration/ConfigurationOptionsResolver.php.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./src/Configuration/ConfigurationOptionsResolver.php 2017-05-16 09:15:18.038164473 +0200
@@ -231,10 +231,10 @@ class ConfigurationOptionsResolver
private function getTemplateConfigPathFromTheme($theme)
{
if ($theme === self::TEMPLATE_THEME_DEFAULT) {
- return $this->themeConfigPathResolver->resolve('/vendor/apigen/theme-default/src/config.neon');
+ return $this->themeConfigPathResolver->resolve('/themes/theme-default/config.neon');
} elseif ($theme === self::TEMPLATE_THEME_BOOTSTRAP) {
- return $this->themeConfigPathResolver->resolve('/vendor/apigen/theme-bootstrap/src/config.neon');
+ return $this->themeConfigPathResolver->resolve('/themes/theme-bootstrap/config.neon');
}
throw new ConfigurationException(CO::TEMPLATE_THEME . ' ' . $theme . ' is not supported.');
diff -up ./src/DI/ApiGenExtension.php.rpm ./src/DI/ApiGenExtension.php
--- ./src/DI/ApiGenExtension.php.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./src/DI/ApiGenExtension.php 2017-05-16 09:15:18.038164473 +0200
@@ -61,10 +61,6 @@ class ApiGenExtension extends CompilerEx
$application = $builder->getDefinition($builder->getByType('ApiGen\Console\Application'));
foreach (array_keys($builder->findByTag(self::TAG_CONSOLE_COMMAND)) as $serviceName) {
- $className = $builder->getDefinition($serviceName)->getClass();
- if ( ! $this->isPhar() && $className === 'ApiGen\Command\SelfUpdateCommand') {
- continue;
- }
$application->addSetup('add', ['@' . $serviceName]);
}
}
diff -up ./src/DI/apigen.services.neon.rpm ./src/DI/apigen.services.neon
--- ./src/DI/apigen.services.neon.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./src/DI/apigen.services.neon 2017-05-16 09:15:18.038164473 +0200
@@ -1,7 +1,6 @@
services:
# commands
- {class: ApiGen\Command\GenerateCommand, tags: [console.command]}
- - {class: ApiGen\Command\SelfUpdateCommand, tags: [console.command]}
# configuration
- ApiGen\Configuration\Configuration
diff -up ./src/Theme/ThemeConfigPathResolver.php.rpm ./src/Theme/ThemeConfigPathResolver.php
--- ./src/Theme/ThemeConfigPathResolver.php.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./src/Theme/ThemeConfigPathResolver.php 2017-05-16 09:15:18.038164473 +0200
@@ -38,7 +38,7 @@ class ThemeConfigPathResolver
{
$allowedPaths = [
$this->rootDir,
- $this->rootDir . '/../../..'
+ '/usr/share/apigen'
];
foreach ($allowedPaths as $allowedPath) {
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
--- ./tests/bootstrap.php.rpm 2017-05-11 14:38:12.000000000 +0200
+++ ./tests/bootstrap.php 2017-05-16 09:23:26.130041699 +0200
@@ -1,7 +1,9 @@
<?php
-include __DIR__ . '/../vendor/autoload.php';
+require_once '@BUILDROOT@/usr/share/php/ApiGen/autoload.php';
+require_once '/usr/share/php/Mockery/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('ApiGen\\Tests\\', __DIR__);
$tempDir = __DIR__ . '/temp/' . getmypid();
define('TEMP_DIR', $tempDir);
|