Zend Framework

Zend_Tool should use autoloader in Project Context

Details

  • Type: Sub-task Sub-task
  • Status: Reopened Reopened
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.5, 1.11.11
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Tool
  • Labels:
    None

Description

I have a extended class in library/ in my project. When I run Zend_Tool, it cannot find a class in there:
zf create action help blocks 1 ip
Creating an action named help inside controller at /var/zf/application/modules/ip/controllers/BlocksController.php

Fatal error: Class 'Extended_Controller' not found in /var/zf/application/modules/ip/controllers/BlocksController.php on line 3

Extended_Controller is in:
library/Extended/Controller.php

Activity

Hide
Benjamin Eberlei added a comment -

With Zend_Tool 1.10 we are able to use Autoloading in the context of Zend_Tool_Project, which should solve this issue.

I'll rename it and convert it into a sub-task for 1.10 requirements.

Show
Benjamin Eberlei added a comment - With Zend_Tool 1.10 we are able to use Autoloading in the context of Zend_Tool_Project, which should solve this issue. I'll rename it and convert it into a sub-task for 1.10 requirements.
Hide
Ralph Schindler added a comment -

Resolved in trunk (for 1.10)

Show
Ralph Schindler added a comment - Resolved in trunk (for 1.10)
Hide
Martin Hujer added a comment -

Still seems broken in latest trunk.

Steps to reproduce:
1) zf create project
2) create library/My/Controller.php:

class My_Controller extends Zend_Controller_Action { }

3) add autoloaderNamespaces[] = "My_" to config
4) change IndexController to extend My_Controller
5) Everything works fine in browser
6) "zf create action foo" dies on error:

Creating an action named foo inside controller at I:\xampp\htdocs\zf1/application/controllers/IndexController.php

Fatal error: Class 'My_Controller' not found in I:\xampp\htdocs\zf1\application\controllers\IndexController.php on line 4
Show
Martin Hujer added a comment - Still seems broken in latest trunk. Steps to reproduce: 1) zf create project 2) create library/My/Controller.php:
class My_Controller extends Zend_Controller_Action { }
3) add autoloaderNamespaces[] = "My_" to config 4) change IndexController to extend My_Controller 5) Everything works fine in browser 6) "zf create action foo" dies on error:
Creating an action named foo inside controller at I:\xampp\htdocs\zf1/application/controllers/IndexController.php

Fatal error: Class 'My_Controller' not found in I:\xampp\htdocs\zf1\application\controllers\IndexController.php on line 4

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: