summaryrefslogtreecommitdiffstats
path: root/phpdoc-adjust-vendor-dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'phpdoc-adjust-vendor-dir.patch')
-rw-r--r--phpdoc-adjust-vendor-dir.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/phpdoc-adjust-vendor-dir.patch b/phpdoc-adjust-vendor-dir.patch
new file mode 100644
index 0000000..00be231
--- /dev/null
+++ b/phpdoc-adjust-vendor-dir.patch
@@ -0,0 +1,55 @@
+diff --git a/bin/phpdoc b/bin/phpdoc
+index 48f862ad..909705cf 100755
+--- a/bin/phpdoc
++++ b/bin/phpdoc
+@@ -10,13 +10,7 @@
+ * @link http://phpdoc.org
+ */
+
+-// determine base include folder, if @php_dir@ contains @php_dir then
+-// we did not install via PEAR
+-$bootstrap_folder = (strpos('@php_dir@', '@php_dir') === 0)
+- ? __DIR__ . '/../src'
+- : '@php_dir@/phpDocumentor/src';
+-
+-include $bootstrap_folder . '/phpDocumentor/Bootstrap.php';
++include '__PHPDIR__/phpDocumentor/Bootstrap.php';
+
+ $app = \phpDocumentor\Bootstrap::createInstance()
+ ->registerProfiler()
+diff --git a/src/Cilex/Provider/JmsSerializerServiceProvider.php b/src/Cilex/Provider/JmsSerializerServiceProvider.php
+index fa3dd0a8..656969ad 100644
+--- a/src/Cilex/Provider/JmsSerializerServiceProvider.php
++++ b/src/Cilex/Provider/JmsSerializerServiceProvider.php
+@@ -28,17 +28,8 @@ class JmsSerializerServiceProvider implements ServiceProviderInterface
+ */
+ public function register(Application $app)
+ {
+- $vendorPath = isset($app['composer.vendor_path'])
+- ? $app['composer.vendor_path']
+- : __DIR__ . '/../../../vendor';
+-
+- $serializerPath = $vendorPath . '/jms/serializer/src';
+- if (!file_exists($serializerPath)) {
+- $serializerPath = __DIR__ . '/../../../../../jms/serializer/src';
+- }
+-
+ $app['serializer.annotations'] = array(
+- array('namespace' => 'JMS\Serializer\Annotation', 'path' => $serializerPath)
++ array('namespace' => 'JMS\Serializer\Annotation', 'path' => '__PHPDIR__')
+ );
+
+ $app['serializer'] = $app->share(
+diff --git a/src/phpDocumentor/Bootstrap.php b/src/phpDocumentor/Bootstrap.php
+index cd0920a7..6a8ffcfb 100644
+--- a/src/phpDocumentor/Bootstrap.php
++++ b/src/phpDocumentor/Bootstrap.php
+@@ -93,7 +93,7 @@ class Bootstrap
+ public function createAutoloader($vendorDir = null)
+ {
+ if (! $vendorDir) {
+- $vendorDir = __DIR__ . '/../../vendor';
++ $vendorDir = __DIR__ . '/vendor';
+ }
+
+ $autoloader_location = $vendorDir . '/autoload.php';