diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-12-31 17:29:59 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-12-31 17:29:59 +0100 |
commit | 0b498c9d2dfc0cf03f61514b35c0f301d3ff614f (patch) | |
tree | be66149f99bc2c267aa4942b1ed693c79a348134 /sabre-vobject-cmd.patch | |
parent | 3838d25cd66208203cdf528e7b98dc2e06533d7b (diff) |
php-sabre-vobject: downgrade to 2.1.3
Diffstat (limited to 'sabre-vobject-cmd.patch')
-rw-r--r-- | sabre-vobject-cmd.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sabre-vobject-cmd.patch b/sabre-vobject-cmd.patch new file mode 100644 index 0000000..8f03e54 --- /dev/null +++ b/sabre-vobject-cmd.patch @@ -0,0 +1,33 @@ +--- bin/vobjectvalidate.php.old 2013-12-31 17:24:11.000000000 +0100 ++++ bin/vobjectvalidate.php 2013-12-31 17:24:27.000000000 +0100 +@@ -1,21 +1,18 @@ +-#!/usr/bin/env php ++#!/usr/bin/php + <?php + + namespace Sabre\VObject; + +-// This sucks.. we have to try to find the composer autoloader. But chances +-// are, we can't find it this way. So we'll do our bestest +-$paths = array( +- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly +- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. +-); ++// Simple PSR-0 autoloader ++// dont rely on include path as pear directory ++// may contains old incompatible version + +-foreach($paths as $path) { +- if (file_exists($path)) { +- include $path; +- break; ++spl_autoload_register(function ($class) { ++ if (strpos($class, 'Sabre\\')===0) { ++ $file = '/usr/share/php/'.str_replace('\\', '/', $class).'.php'; ++ @include $file; + } +-} ++}); + + if (!class_exists('Sabre\\VObject\\Version')) { + fwrite(STDERR, "Composer autoloader could not be properly loaded.\n"); |