Browse Source

Move Composer autoload require out of boot.php

tags/2019.01
Hypolite Petovan 9 months ago
parent
commit
ed7bada71e
6 changed files with 6 additions and 10 deletions
  1. 1
    1
      bin/auth_ejabberd.php
  2. 1
    1
      bin/console.php
  3. 1
    1
      bin/daemon.php
  4. 1
    1
      bin/worker.php
  5. 0
    2
      boot.php
  6. 2
    4
      index.php

+ 1
- 1
bin/auth_ejabberd.php View File

@@ -49,7 +49,7 @@ $directory = realpath($directory . DIRECTORY_SEPARATOR . "..");
49 49
 
50 50
 chdir($directory);
51 51
 
52
-require_once "boot.php";
52
+require dirname(__DIR__) . '/vendor/autoload.php';
53 53
 
54 54
 $a = new App(dirname(__DIR__));
55 55
 

+ 1
- 1
bin/console.php View File

@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env php
2 2
 <?php
3 3
 
4
-include_once dirname(__DIR__) . '/boot.php';
4
+require dirname(__DIR__) . '/vendor/autoload.php';
5 5
 
6 6
 $a = new Friendica\App(dirname(__DIR__));
7 7
 \Friendica\BaseObject::setApp($a);

+ 1
- 1
bin/daemon.php View File

@@ -30,7 +30,7 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
30 30
 	chdir($directory);
31 31
 }
32 32
 
33
-require_once "boot.php";
33
+require dirname(__DIR__) . '/vendor/autoload.php';
34 34
 
35 35
 $a = new App(dirname(__DIR__));
36 36
 

+ 1
- 1
bin/worker.php View File

@@ -26,7 +26,7 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
26 26
 	chdir($directory);
27 27
 }
28 28
 
29
-require_once "boot.php";
29
+require dirname(__DIR__) . '/vendor/autoload.php';
30 30
 
31 31
 $a = new App(dirname(__DIR__));
32 32
 

+ 0
- 2
boot.php View File

@@ -17,8 +17,6 @@
17 17
  * easily as email does today.
18 18
  */
19 19
 
20
-require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
21
-
22 20
 use Friendica\App;
23 21
 use Friendica\BaseObject;
24 22
 use Friendica\Core\Addon;

+ 2
- 4
index.php View File

@@ -4,12 +4,10 @@
4 4
  * Friendica
5 5
  */
6 6
 
7
-use Friendica\App;
8
-
9
-require_once 'boot.php';
7
+require dirname(__DIR__) . '/vendor/autoload.php';
10 8
 
11 9
 // We assume that the index.php is called by a frontend process
12 10
 // The value is set to "true" by default in App
13
-$a = new App(__DIR__, false);
11
+$a = new Friendica\App(__DIR__, false);
14 12
 
15 13
 $a->runFrontend();

Loading…
Cancel
Save