Projects
Kolab:16:Testing:Candidate
php-sabre-dav
0001-Use-homemade-autoload.php.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Use-homemade-autoload.php.patch of Package php-sabre-dav (Revision 2)
Currently displaying revision
2
,
Show latest
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org> Date: Thu, 26 Feb 2015 10:10:46 -0400 Subject: Use homemade autoload.php Work around the lack of proper autoload.php from Composer. Forwarded: not-needed --- bin/build.php | 3 ++- bin/migrateto17.php | 6 +++--- bin/migrateto20.php | 6 +++--- bin/migrateto21.php | 6 +++--- bin/naturalselection | 2 +- bin/sabredav.php | 4 ++-- examples/addressbookserver.php | 2 +- examples/calendarserver.php | 2 +- examples/fileserver.php | 2 +- examples/groupwareserver.php | 2 +- examples/simplefsserver.php | 6 +----- 11 files changed, 19 insertions(+), 22 deletions(-) diff --git a/bin/build.php b/bin/build.php index 3ccb7e5..47c9347 100644 --- a/bin/build.php +++ b/bin/build.php @@ -1,3 +1,4 @@ +#!/usr/bin/php <?php $tasks = [ @@ -77,7 +78,7 @@ function init() { global $version; if (!$version) { - include __DIR__ . '/../vendor/autoload.php'; + include __DIR__ . '/../lib/autoload.php'; $version = Sabre\DAV\Version::VERSION; } diff --git a/bin/migrateto17.php b/bin/migrateto17.php index 66a9ee5..67a75e6 100755 --- a/bin/migrateto17.php +++ b/bin/migrateto17.php @@ -1,4 +1,4 @@ -#!/usr/bin/env php +#!/usr/bin/php <?php echo "SabreDAV migrate script for version 1.7\n"; @@ -36,8 +36,8 @@ HELLO; // There's a bunch of places where the autoloader could be, so we'll try all of // them. $paths = array( - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', + __DIR__ . '/../lib/autoload.php', + __DIR__ . '/../share/php/sabre21/Sabre/autoload.php', ); foreach($paths as $path) { diff --git a/bin/migrateto20.php b/bin/migrateto20.php index e8827f4..90ce2ba 100755 --- a/bin/migrateto20.php +++ b/bin/migrateto20.php @@ -1,4 +1,4 @@ -#!/usr/bin/env php +#!/usr/bin/php <?php echo "SabreDAV migrate script for version 2.0\n"; @@ -42,8 +42,8 @@ HELLO; // There's a bunch of places where the autoloader could be, so we'll try all of // them. $paths = [ - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', + __DIR__ . '/../lib/autoload.php', + __DIR__ . '/../share/php/sabre21/Sabre/autoload.php', ]; foreach($paths as $path) { diff --git a/bin/migrateto21.php b/bin/migrateto21.php index 9a5a315..d7fc83d 100755 --- a/bin/migrateto21.php +++ b/bin/migrateto21.php @@ -1,4 +1,4 @@ -#!/usr/bin/env php +#!/usr/bin/php <?php echo "SabreDAV migrate script for version 2.1\n"; @@ -43,8 +43,8 @@ HELLO; // There's a bunch of places where the autoloader could be, so we'll try all of // them. $paths = [ - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', + __DIR__ . '/../lib/autoload.php', + __DIR__ . '/../share/php/sabre21/Sabre/autoload.php', ]; foreach($paths as $path) { diff --git a/bin/naturalselection b/bin/naturalselection index aa5554d..8ccd33b 100755 --- a/bin/naturalselection +++ b/bin/naturalselection @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # # Copyright (c) 2009-2010 Evert Pot diff --git a/bin/sabredav.php b/bin/sabredav.php index 34a674f..def97fd 100755 --- a/bin/sabredav.php +++ b/bin/sabredav.php @@ -28,8 +28,8 @@ if (php_sapi_name()!=='cli-server') { $paths = array( - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', + __DIR__ . '/../lib/autoload.php', + __DIR__ . '/autoload.php', ); foreach($paths as $path) { diff --git a/examples/addressbookserver.php b/examples/addressbookserver.php index 4ae78f7..32cc271 100644 --- a/examples/addressbookserver.php +++ b/examples/addressbookserver.php @@ -26,7 +26,7 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { set_error_handler("exception_error_handler"); // Autoloader -require_once 'vendor/autoload.php'; +require_once 'sabre21/Sabre/autoload.php'; // Backends $authBackend = new Sabre\DAV\Auth\Backend\PDO($pdo); diff --git a/examples/calendarserver.php b/examples/calendarserver.php index de08a10..2a369ad 100644 --- a/examples/calendarserver.php +++ b/examples/calendarserver.php @@ -26,7 +26,7 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { set_error_handler("exception_error_handler"); // Files we need -require_once 'vendor/autoload.php'; +require_once 'sabre21/Sabre/autoload.php'; // Backends $authBackend = new Sabre\DAV\Auth\Backend\PDO($pdo); diff --git a/examples/fileserver.php b/examples/fileserver.php index 952b550..9f9282c 100644 --- a/examples/fileserver.php +++ b/examples/fileserver.php @@ -20,7 +20,7 @@ $tmpDir = 'tmpdata'; // Files we need -require_once 'vendor/autoload.php'; +require_once 'sabre21/Sabre/autoload.php'; // Create the root node $root = new \Sabre\DAV\FS\Directory($publicDir); diff --git a/examples/groupwareserver.php b/examples/groupwareserver.php index 668b92b..e5f2d04 100644 --- a/examples/groupwareserver.php +++ b/examples/groupwareserver.php @@ -48,7 +48,7 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { set_error_handler("exception_error_handler"); // Autoloader -require_once 'vendor/autoload.php'; +require_once 'sabre21/Sabre/autoload.php'; /** * The backends. Yes we do really need all of them. diff --git a/examples/simplefsserver.php b/examples/simplefsserver.php index cf64730..f1c8d84 100644 --- a/examples/simplefsserver.php +++ b/examples/simplefsserver.php @@ -1,9 +1,5 @@ <?php -// !!!! Make sure the Sabre directory is in the include_path !!! -// example: -// set_include_path('lib/' . PATH_SEPARATOR . get_include_path()); - /* This example demonstrates a simple way to create your own virtual filesystems. @@ -24,7 +20,7 @@ date_default_timezone_set('Canada/Eastern'); $publicDir = 'public'; // Files we need -require_once 'vendor/autoload.php'; +require_once 'sabre21/Sabre/autoload.php'; class MyCollection extends Sabre\DAV\Collection {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.