From 096587426c1f6194f2fa909a191d35af513e5b92 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 31 Dec 2013 18:21:41 +0100 Subject: php-sabre-dav: 1.8.7 - new package --- sabre-dav-autoload.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sabre-dav-autoload.patch (limited to 'sabre-dav-autoload.patch') diff --git a/sabre-dav-autoload.patch b/sabre-dav-autoload.patch new file mode 100644 index 0000000..1aa22db --- /dev/null +++ b/sabre-dav-autoload.patch @@ -0,0 +1,20 @@ +--- lib/Sabre/autoload.php.old 2013-12-31 17:54:12.000000000 +0100 ++++ lib/Sabre/autoload.php 2013-12-31 17:58:28.000000000 +0100 +@@ -15,11 +15,9 @@ + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License + */ + +-/** +- * We are assuming that the composer autoloader is just 2 directories up. +- * +- * This is not the case when sabredav is installed as a dependency. But, in +- * those cases it's not expected that people will look for this file anyway. +- */ +- +-require __DIR__ . '/../../vendor/autoload.php'; ++spl_autoload_register(function ($class) { ++ if (strpos($class,'Sabre\\')===0) { ++ $file = __DIR__ . str_replace('\\', '/', substr($class,5)).'.php'; ++ @include $file; ++ } ++}); -- cgit