From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Wed, 10 May 2023 07:57:09 +0200
Subject: Use homemade autoload.php

Forwarded: not-needed
---
 examples/shared.php | 2 +-
 tests/bootstrap.php | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/examples/shared.php b/examples/shared.php
index f82e6b0..9bcaa19 100644
--- a/examples/shared.php
+++ b/examples/shared.php
@@ -14,7 +14,7 @@ if (PHP_SAPI !== 'cli') {
     exit('Example scripts are meant to be executed locally via CLI.');
 }
 
-require __DIR__ . '/../autoload.php';
+require 'Predis/autoload.php';
 
 function redis_version($info)
 {
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index c1dff70..696e1d1 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -10,7 +10,11 @@
  * file that was distributed with this source code.
  */
 
-if (file_exists(__DIR__ . '/../autoload.php')) {
+if (file_exists('Predis/autoload.php')) {
+    require 'Predis/autoload.php';
+} elseif (file_exists('/usr/share/php/Predis/autoload.php')) {
+    require '/usr/share/php/Predis/autoload.php';
+} elseif (file_exists(__DIR__ . '/../autoload.php')) {
     require __DIR__ . '/../autoload.php';
 } elseif (@include ('Predis/Autoloader.php')) {
     Predis\Autoloader::register();
