DDC-786: Proxy Generation, Zend, and Pear Convention Name #967

Closed
opened 2026-01-22 12:57:35 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 3, 2010).

Jira issue originally created by user throrin19:

In Zend Framework 1.10, the classNames are using the Pear Convention Name :

class Model_Proxy_ClassName = /model/Proxy/ClassName.php

But, in the Proxy Generation Classes, Doctrine2 use PHP5.3 Namespaces + Entity ClassName.

This has the result of not respecting the Convention PEAR and unfortunately there is no option to switch to Doctrine and told them to format the name of the classes.

For example :

Entity class: TLangue.php :

class Model*Entity*TLangue   {
//...
}

And the Proxy Generation:

Proxy CLass: Model_Entity_TLangueProxy.php:

class Model*Entity_TLangueProxy extends \Model_Entity*TLangue implements \Doctrine\ORM\Proxy\Proxy{
//...
}

An I would like this result for the Proxy Class:

Proxy CLass: TLangue.php

class Model*Proxy_TLangue extends Model_Entity*TLangue implements \Doctrine\ORM\Proxy\Proxy{
//...
}

Is it possible to get this result?

Originally created by @doctrinebot on GitHub (Sep 3, 2010). Jira issue originally created by user throrin19: In Zend Framework 1.10, the classNames are using the Pear Convention Name : class Model_Proxy_ClassName = /model/Proxy/ClassName.php But, in the Proxy Generation Classes, Doctrine2 use PHP5.3 Namespaces + Entity ClassName. This has the result of not respecting the Convention PEAR and unfortunately there is no option to switch to Doctrine and told them to format the name of the classes. For example : Entity class: TLangue.php : ``` class Model*Entity*TLangue { //... } ``` And the Proxy Generation: Proxy CLass: Model_Entity_TLangueProxy.php: ``` class Model*Entity_TLangueProxy extends \Model_Entity*TLangue implements \Doctrine\ORM\Proxy\Proxy{ //... } ``` An I would like this result for the Proxy Class: Proxy CLass: TLangue.php ``` class Model*Proxy_TLangue extends Model_Entity*TLangue implements \Doctrine\ORM\Proxy\Proxy{ //... } ``` Is it possible to get this result?
admin added the Improvement label 2026-01-22 12:57:35 +01:00
admin closed this issue 2026-01-22 12:57:35 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 23, 2010):

Comment created by gog:

Why don't you use Doctrines auto loader for loading entities and proxies?

Here is a snippet from my ZF Boostrap:

        $classLoader = new ClassLoader('Doctrine', ROOT_PATH . '/library');
        $classLoader->register();
        $classLoader = new ClassLoader('Entities', APPLICATION_PATH . '/domain');
        $classLoader->register();
        $classLoader = new ClassLoader('Proxies', APPLICATION_PATH . '/domain');
        $classLoader->register();

Once ZF2 is finished you will have a ZF autoloader with namespace support.

I do not think this is something Doctrine should care about.

@doctrinebot commented on GitHub (Oct 23, 2010): Comment created by gog: Why don't you use Doctrines auto loader for loading entities and proxies? Here is a snippet from my ZF Boostrap: ``` $classLoader = new ClassLoader('Doctrine', ROOT_PATH . '/library'); $classLoader->register(); $classLoader = new ClassLoader('Entities', APPLICATION_PATH . '/domain'); $classLoader->register(); $classLoader = new ClassLoader('Proxies', APPLICATION_PATH . '/domain'); $classLoader->register(); ``` Once ZF2 is finished you will have a ZF autoloader with namespace support. I do not think this is something Doctrine should care about.
Author
Owner

@doctrinebot commented on GitHub (Oct 29, 2010):

Comment created by @beberlei:

Doctrine2 follows the PSR-0 standard for autoloading which works on namespaces, not the underscore. There won't be special logic to fix this for the old PEAR/Zend Standard.

@doctrinebot commented on GitHub (Oct 29, 2010): Comment created by @beberlei: Doctrine2 follows the PSR-0 standard for autoloading which works on namespaces, not the underscore. There won't be special logic to fix this for the old PEAR/Zend Standard.
Author
Owner

@doctrinebot commented on GitHub (Oct 29, 2010):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Oct 29, 2010): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#967