DDC-941: Generating proxiew from cli orm:generate-proxies #1168

Closed
opened 2026-01-22 13:04:32 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 17, 2010).

Jira issue originally created by user umpirsky:

I have attached my cli-config.php and yaml mappings. With this setup, when I try to generate proxies with:

doctrine orm:generate-proxies

I get:

Warning: class_parents(): Class Channel does not exist and could not
be loaded in library\Doctrine\ORM\Mapping\ClassMetadataFactory.php on
line 222

Warning: array_reverse() expects parameter 1 to be array, boolean
given in library\Doctrine\ORM\Mapping\ClassMetadataFactory.php on line
222

Warning: Invalid argument supplied for foreach() in library\Doctrine
\ORM\Mapping\ClassMetadataFactory.php on line 222

[ReflectionException]
Class Channel does not exist
Similar thing happends when I try orm:generate-repositories.

Then I changed my cli-config.php

$config->setMetadataDriverImpl($config->newDefaultAnnotationDriver(realpath(realpath(dirname(FILE)) . '/..')));
//$config->setMetadataDriverImpl(new Doctrine\ORM\Mapping\Driver\YamlDriver('./../config/mappings'));

and it works. I wonder, why it works with annotation driver, and not with yaml driver?

Originally created by @doctrinebot on GitHub (Dec 17, 2010). Jira issue originally created by user umpirsky: I have attached my cli-config.php and yaml mappings. With this setup, when I try to generate proxies with: doctrine orm:generate-proxies I get: Warning: class_parents(): Class Channel does not exist and could not be loaded in library\Doctrine\ORM\Mapping\ClassMetadataFactory.php on line 222 Warning: array_reverse() expects parameter 1 to be array, boolean given in library\Doctrine\ORM\Mapping\ClassMetadataFactory.php on line 222 Warning: Invalid argument supplied for foreach() in library\Doctrine \ORM\Mapping\ClassMetadataFactory.php on line 222 [ReflectionException] Class Channel does not exist Similar thing happends when I try orm:generate-repositories. Then I changed my cli-config.php $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver(realpath(realpath(dirname(__FILE__)) . '/..'))); //$config->setMetadataDriverImpl(new Doctrine\ORM\Mapping\Driver\YamlDriver('./../config/mappings')); and it works. I wonder, why it works with annotation driver, and not with yaml driver?
admin added the Bug label 2026-01-22 13:04:32 +01:00
admin closed this issue 2026-01-22 13:04:34 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 18, 2010):

Comment created by @beberlei:

Try not prefixing your class with \ in the yaml file.

@doctrinebot commented on GitHub (Dec 18, 2010): Comment created by @beberlei: Try not prefixing your class with \ in the yaml file.
Author
Owner

@doctrinebot commented on GitHub (Jun 5, 2011):

Comment created by @beberlei:

No more feedback given, description suggests mapping error. Reopen if still failing.

@doctrinebot commented on GitHub (Jun 5, 2011): Comment created by @beberlei: No more feedback given, description suggests mapping error. Reopen if still failing.
Author
Owner

@doctrinebot commented on GitHub (Jun 5, 2011):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Jun 5, 2011): 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#1168