]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
composer: display an error message if the autoload script is missing 646/head
authorVirtualTam <virtualtam@flibidi.net>
Sun, 4 Sep 2016 21:57:21 +0000 (23:57 +0200)
committerVirtualTam <virtualtam@flibidi.net>
Sun, 4 Sep 2016 22:04:57 +0000 (00:04 +0200)
Closes https://github.com/shaarli/Shaarli/issues/645
Relates to https://github.com/shaarli/Shaarli/issues/607

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
index.php

index 1f148d781e225cd402fa6454aeceb849bf4febf4..c6f86c5934bd9cd3cd29bd6c869e4569b091442c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -45,6 +45,16 @@ error_reporting(E_ALL^E_WARNING);
 
 
 // 3rd-party libraries
+if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
+    header('Content-Type: text/plain; charset=utf-8');
+    echo "Error: missing Composer configuration\n\n"
+        ."If you installed Shaarli through Git or using the development branch,\n"
+        ."please refer to the installation documentation to install PHP"
+        ." dependencies using Composer:\n"
+        ."- https://github.com/shaarli/Shaarli/wiki/Server-requirements\n"
+        ."- https://github.com/shaarli/Shaarli/wiki/Download-and-Installation";
+    exit;
+}
 require_once 'inc/rain.tpl.class.php';
 require_once __DIR__ . '/vendor/autoload.php';