summaryrefslogtreecommitdiffstats
path: root/apigen-rpm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'apigen-rpm.patch')
-rw-r--r--apigen-rpm.patch87
1 files changed, 39 insertions, 48 deletions
diff --git a/apigen-rpm.patch b/apigen-rpm.patch
index 0a7e887..bc167f9 100644
--- a/apigen-rpm.patch
+++ b/apigen-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/apigen.rpm ./bin/apigen
---- ./bin/apigen.rpm 2015-10-30 13:44:43.000000000 +0100
-+++ ./bin/apigen 2015-11-03 08:06:32.480579189 +0100
+--- ./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
@@ -22,43 +22,38 @@ diff -up ./bin/apigen.rpm ./bin/apigen
diff -up ./src/autoload.php.rpm ./src/autoload.php
---- ./src/autoload.php.rpm 2015-11-03 08:06:32.481579194 +0100
-+++ ./src/autoload.php 2015-11-03 08:10:03.608531505 +0100
-@@ -0,0 +1,31 @@
+--- ./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
-+$vendor = '/usr/share/php';
+
-+if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
-+ if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
-+ require_once $vendor . '/Symfony/Component/ClassLoader/ClassLoader.php';
-+ }
++require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+
-+ $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
-+ $fedoraClassLoader->register();
-+}
++\Fedora\Autoloader\Autoload::addPsr4('ApiGen\\', __DIR__);
+
-+$fedoraClassLoader->addPrefix('ApiGen\\', dirname(__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',
++));
+
-+// Dependencies
-+$fedoraClassLoader->addPrefix('Symfony\\Component\\', $vendor);
-+$fedoraClassLoader->addPrefix('TokenReflection\\', $vendor);
-+$fedoraClassLoader->addPrefix('Michelf\\', $vendor);
-+
-+require_once $vendor . '/Nette/Application/autoload.php';
-+require_once $vendor . '/Nette/Bootstrap/autoload.php';
-+require_once $vendor . '/Nette/DI/autoload.php';
-+require_once $vendor . '/Nette/Neon/autoload.php';
-+require_once $vendor . '/Nette/Mail/autoload.php';
-+require_once $vendor . '/Nette/RobotLoader/autoload.php';
-+require_once $vendor . '/Nette/SafeStream/autoload.php';
-+require_once $vendor . '/Latte/autoload.php';
-+require_once $vendor . '/Tracy/autoload.php';
-+require_once $vendor . '/FSHL/autoload.php';
-+require_once $vendor . '/Kdyby/Events/autoload.php';
diff -up ./src/Configuration/ConfigurationOptionsResolver.php.rpm ./src/Configuration/ConfigurationOptionsResolver.php
---- ./src/Configuration/ConfigurationOptionsResolver.php.rpm 2015-10-30 13:44:43.000000000 +0100
-+++ ./src/Configuration/ConfigurationOptionsResolver.php 2015-11-03 08:06:32.481579194 +0100
+--- ./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)
{
@@ -73,8 +68,8 @@ diff -up ./src/Configuration/ConfigurationOptionsResolver.php.rpm ./src/Configur
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 2015-11-03 08:08:42.874167346 +0100
-+++ ./src/DI/ApiGenExtension.php 2015-11-03 08:09:24.816356528 +0100
+--- ./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'));
@@ -87,8 +82,8 @@ diff -up ./src/DI/ApiGenExtension.php.rpm ./src/DI/ApiGenExtension.php
}
}
diff -up ./src/DI/apigen.services.neon.rpm ./src/DI/apigen.services.neon
---- ./src/DI/apigen.services.neon.rpm 2015-11-03 08:08:48.525192830 +0100
-+++ ./src/DI/apigen.services.neon 2015-11-03 08:08:55.423223948 +0100
+--- ./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
@@ -98,8 +93,8 @@ diff -up ./src/DI/apigen.services.neon.rpm ./src/DI/apigen.services.neon
# configuration
- ApiGen\Configuration\Configuration
diff -up ./src/Theme/ThemeConfigPathResolver.php.rpm ./src/Theme/ThemeConfigPathResolver.php
---- ./src/Theme/ThemeConfigPathResolver.php.rpm 2015-10-30 13:44:43.000000000 +0100
-+++ ./src/Theme/ThemeConfigPathResolver.php 2015-11-03 08:06:32.481579194 +0100
+--- ./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 = [
@@ -110,20 +105,16 @@ diff -up ./src/Theme/ThemeConfigPathResolver.php.rpm ./src/Theme/ThemeConfigPath
foreach ($allowedPaths as $allowedPath) {
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
---- ./tests/bootstrap.php.rpm 2015-10-30 13:44:43.000000000 +0100
-+++ ./tests/bootstrap.php 2015-11-03 08:10:14.113578889 +0100
-@@ -1,7 +1,13 @@
+--- ./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';
-+include '@BUILDROOT@/usr/share/php/ApiGen/autoload.php';
++require_once '@BUILDROOT@/usr/share/php/ApiGen/autoload.php';
++require_once '/usr/share/php/Mockery/autoload.php';
-+require_once $vendor . '/Symfony/Component/ClassLoader/Psr4ClassLoader.php';
-+$Loader = new \Symfony\Component\ClassLoader\Psr4ClassLoader();
-+$Loader->addPrefix("ApiGen\\Tests\\", __DIR__);
-+$Loader->register();
-+
-+require_once $vendor . '/Mockery/autoload.php';
++\Fedora\Autoloader\Autoload::addPsr4('ApiGen\\Tests\\', __DIR__);
$tempDir = __DIR__ . '/temp/' . getmypid();
define('TEMP_DIR', $tempDir);