DDC-1771: CLI generation of proxies for abstract STI base classes #2423

Closed
doctrinebot opened this Issue Apr 5, 2012 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user breathe:

When I use the CLI tool to generate proxies manually (orm:generate-proxies), a proxy is generated for the abstract entity below, but this proxy is not declared abstract itself. The entity contains abstract methods, and the proxy obviously does not implement these methods, so it, too, must be declared abstract. Because it is not, the next time I try to generate proxies in this manner, I receive a PHP Fatal error:

Class Proxies*CG*\Ranking\AbstractRule contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Ranking\AbstractRule::myAbstractMethod)

My workaround is to delete this proxy first and then regenerate. While a minor inconvenience at this point, it would be great if the proxy generation code could mark proxies as abstract when necessary to avoid these errors.

Thank you.

-- Entity

/****

  • @Entity
  • @InheritanceType("SINGLE_TABLE")
  • @DiscriminatorColumn(name="rankingrule_typeid", type="integer")
  • @DiscriminatorMap({
  • 1 = "ConcreteRuleOne",
  • 2 = "ConcreteRuleTwo",
  • 3 = "ConcreteRuleThree"
  • })
  • @Table(name="ranking_rules") */ abstract class AbstractRule {

-- Generated proxy

/****

  • THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE. */ class AbstractRule extends \Ranking\AbstractRule implements \Doctrine\ORM\Proxy\Proxy {
@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by breathe:

Thank you, sir.

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.2.2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment