ZF-12122: Zend_Tool (zf) doesn't respect ZF_TOOL_INCLUDE_PATH_PREPEND
Description
Zend_Tool CLI isn't respecting the ZF_TOOL_INCLUDE_PATH_PREPEND environment variable. Setup (using cygwin):
Environment:
$ env | grep ZF ZF_CONFIG_FILE=C:\Users\guice\Documents\Sites\vhosts\cis.dev/.zf.ini ZF_HOME=C:\Users\guice\Documents\Sites\vhosts\cis.dev ZF_TOOL_INCLUDE_PATH_PREPEND=C:\Users\guice\Documents\Sites\vhosts\cis.dev\application
$ cat .zf.ini basicloader.classes.1=Glacial_Tools_DbModel
$ zf --setup
ZF Command Line Tool - Setup
----------------------------
Current Paths (Existing or not):
Home Directory: C:\Users\guice\Documents\Sites\vhosts\cis.dev
Storage Directory: C:\Users\guice\Documents\Sites\vhosts\cis.dev/.zf/
Config File: C:\Users\guice\Documents\Sites\vhosts\cis.dev/.zf.ini
...
$ ls -l $ZF_TOOL_INCLUDE_PATH_PREPEND/Glacial/Tools/ total 5.0K -rw-r--r-- 1 guice Domain Users 1.5K Mar 27 09:09 DbModel.php -rw-r--r-- 1 guice Domain Users 279 Mar 26 17:29 Manifest.php
Class File:
<?php
namespace Glacial\Tools
{
class DbModel extends \Zend_Tool_Project_Provider_Abstract
implements \Zend_Tool_Framework_Provider_Pretendable
{
...
}
}
namespace
{
class Glacial_Tools_DbModel extends \Glacial\Tools\DbModel
{
// Nothing to see here. This is a hack to make Zend_Tool a happy puppy.
}
}
Running the command:
$ zf
Warning: include_once(Glacial\Tools\DbModel.php): failed to open stream: No such file or directory in C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Loader.php on line 146
Call Stack:
0.0012 469992 1. {main}() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:0
0.0012 469992 2. ZF::main() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:623
0.0064 817752 3. ZF->run() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:74
0.0064 817752 4. ZF->_runTool() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:117
0.0078 907536 5. Zend_Tool_Framework_Client_Abstract->dispatch() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:600
0.0078 907536 6. Zend_Tool_Framework_Client_Abstract->initialize() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Client\Abstract.php:223
0.0274 2052672 7. Zend_Tool_Framework_Loader_BasicLoader->load() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Client\Abstract.php:122
0.0563 3313544 8. Zend_Loader::loadClass() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Loader\BasicLoader.php:110
0.0563 3313856 9. Zend_Loader::loadFile() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Loader.php:94
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Glacial\Tools\DbModel.php" does not exist or class "Glacial_Tools_DbModel" was not found in the file' in C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Loader.php on line 99
Zend_Exception: File "Glacial\Tools\DbModel.php" does not exist or class "Glacial_Tools_DbModel" was not found in the file in C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Loader.php on line 99
Call Stack:
0.0012 469992 1. {main}() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:0
0.0012 469992 2. ZF::main() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:623
0.0064 817752 3. ZF->run() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:74
0.0064 817752 4. ZF->_runTool() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:117
0.0078 907536 5. Zend_Tool_Framework_Client_Abstract->dispatch() C:\Users\guice\Documents\Sites\vhosts\cis.dev\bin\zf.php:600
0.0078 907536 6. Zend_Tool_Framework_Client_Abstract->initialize() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Client\Abstract.php:223
0.0274 2052672 7. Zend_Tool_Framework_Loader_BasicLoader->load() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Client\Abstract.php:122
0.0563 3313544 8. Zend_Loader::loadClass() C:\Users\guice\Documents\Sites\library\cis.externals\php\Zend\Tool\Framework\Loader\BasicLoader.php:110
Pretty clear ZF_TOOL_INCLUDE_PATH_PREPEND isn't being prepended to the path. I've searched the library code base and found no instances of ZF_TOOL_INCLUDE_PATH_PREPEND other than the "help" documents and comments (but is it possible it's buried somewhere else ... maybe).
Comments
No comments to display