We use the Zend Search library in our symfony project, which worked
great as long as it was in the sf_lib_dir. However when we recently
moved it to sf_lib_dir/vendor, to tidy up our sf_lib_dir and mirror
symfony's directory structure, our project broke and I find these
errors using the dev interface:

Warning: require_once(Zend/Search/Lucene/Analysis/Token.php)
[function.require-once]: failed to open stream: No such file or
directory in /home/jablko/public_html/ica-atom/lib/vendor/Zend/Search/
Lucene/Analysis/Analyzer.php on line 24

Fatal error: require_once() [function.require]: Failed opening
required 'Zend/Search/Lucene/Analysis/Token.php' (include_path='/home/
jablko/public_html/ica-atom/lib:/home/jablko/public_html/ica-atom:/
home/jablko/public_html/ica-atom/apps/ica-atom/lib:/home/jablko/
public_html/ica-atom/config/../lib/vendor/symfony/lib/vendor:.:/usr/
share/php:/usr/share/pear') in /home/jablko/public_html/ica-atom/lib/
vendor/Zend/Search/Lucene/Analysis/Analyzer.php on line 24

I applied the following patch to fix the problem:

Index: lib/vendor/symfony/lib/util/sfCore.class.php
===================================================================
--- lib/vendor/symfony/lib/util/sfCore.class.php        (revision 4793)
+++ lib/vendor/symfony/lib/util/sfCore.class.php        (working copy)
@@ -82,7 +82,7 @@
   static public function initIncludePath()
   {
     set_include_path(
-      sfConfig::get('sf_lib_dir').PATH_SEPARATOR.
+
sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'vendor'.PATH_SEPARATOR.
       sfConfig::get('sf_root_dir').PATH_SEPARATOR.
       sfConfig::get('sf_app_lib_dir').PATH_SEPARATOR.
 
sfConfig::get('sf_symfony_lib_dir').DIRECTORY_SEPARATOR.'vendor'.PATH_SEPARATOR.
Index: lib/vendor/symfony/data/bin/symfony.php
===================================================================
--- lib/vendor/symfony/data/bin/symfony.php     (revision 4793)
+++ lib/vendor/symfony/data/bin/symfony.php     (working copy)
@@ -142,7 +142,7 @@

 // include path
 set_include_path(
-  sfConfig::get('sf_lib_dir').PATH_SEPARATOR.
+
sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'vendor'.PATH_SEPARATOR.
   sfConfig::get('sf_app_lib_dir').PATH_SEPARATOR.
   sfConfig::get('sf_model_dir').PATH_SEPARATOR.
 
sfConfig::get('sf_symfony_lib_dir').DIRECTORY_SEPARATOR.'vendor'.PATH_SEPARATOR.

However I wonder, does symfony not support locating libraries in
sf_lib_dir/vendor? Is there a convenient place to add sf_lib_dir/
vendor to our include path, without modifying symfony's code?

Much thanks, Jack


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to