summaryrefslogtreecommitdiffstats
path: root/phpdoc-adjust-vendor-dir.patch
blob: 00be231c030e269815a9ac121918296f7d23caff (plain)
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
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';