ZF-8899: Custom Zend_Tool_Framework_Provider classes are not found in include_path with ZendFramework-1.10

Issue Type: Bug Created: 2010-01-22T01:31:39.000+0000 Last Updated: 2010-10-21T08:14:28.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Stefan Stubbe (stefan.stubbe) Assignee: Ralph Schindler (ralph) Tags: - Zend_Tool

Related issues: - ZF-9397



I'm following the manual for creating a custom Zend_Tool_Framework provider [1] in Zend Framework 1.10 (tested both beta1 and rc1) My custom provider is never found although my provider and manifest are in the include_path.

This seems to be because Zend_Tool_Framework_Client_Console is now forcing the use of the BasicLoader in Zend_Tool_Framework_Registry. Previous zf version (I checked both 1.9.7 and 1.9.6) defaulted to the IncludePathLoader.

I can't find a way to override this new behaviour


Posted by Stefan Stubbe (stefan.stubbe) on 2010-01-22T01:42:36.000+0000

To provide some more information, my current setup:

<pre class="highlight">
`-- Tool
    |-- HelloProvider.php
    `-- Manifest.php


<pre class="highlight">

class My_Tool_Manifest implements Zend_Tool_Framework_Manifest_ProviderManifestable
        public function getProviders()
                return array(
                        new My_Tool_HelloProvider


<pre class="highlight">

class My_Tool_HelloProvider implements Zend_Tool_Framework_Provider_Interface
        public function say()
                echo 'Hello from my provider!', PHP_EOL;

Command I am using:

<pre class="highlight">
/home/yahiko $ cd /local/www/library
/local/www/library $ ZEND_TOOL_INCLUDE_PATH=$(pwd) /local/www/library/ZendFramework-1.10.0rc1-minimal/bin/ say hello

Posted by Benjamin Eberlei (beberlei) on 2010-01-22T05:16:17.000+0000

The include path loader has been replaced with the basic loader.

You have to hook custom classes into Zend Tool by adding the following line to your .zf.ini:

<pre class="highlight">
basicloader.classes.0 = "My_ClassName"
basicloader.classes.1 = "My_Manifest"

Or you use the command:

<pre class="highlight">
benny@benny-pc:~$ zf enable config.?
Zend Framework Command Line Console Tool v1.10.0alpha
Details for action "Enable" and provider "Config"
    zf enable config.manifest class-name
    zf enable config.provider class-name

This does the same.

Posted by Stefan Stubbe (stefan.stubbe) on 2010-01-22T06:58:52.000+0000

Adding the custom classes to my .zf.ini did the trick.

The documentation however does not mention this and still talks about the IncludePathLoader

Posted by Guillermo Thiemann (guille) on 2010-03-11T02:23:04.000+0000

I would say that the environment-level configuration .zf.ini is a bad location to put custom providers anyway.

What if I have project-specific Providers and more than one Project running in one server?

Posted by James Stuart (jstuart) on 2010-03-23T12:54:02.000+0000

I agree. Causing Zend Tool extensions to be loaded globally (per user) significantly diminishes their usefulness for project based tasks.

We have many developers, each with multiple workstations, working on many projects. Having your configuration based on the user account (and workstation) that you're using and not the application that you're working on is a hurdle that will prevent us from using Zend Tool at all.

On the server side, our hosting setup causes us to have many applications on the same server running as the same user. We obviously cannot use the same configuration for each application, so the environment-level configuration doesn't work here either.

Posted by Ralph Schindler (ralph) on 2010-10-21T08:14:27.000+0000

Fixed in r23201 in trunk & r23202 in release branch 1.11 (as part of ZF-9397)

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.