Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php app/console doctrine:mapping:import thrown ErrorException #276

Closed
yoander opened this issue Feb 28, 2012 · 3 comments
Closed

php app/console doctrine:mapping:import thrown ErrorException #276

yoander opened this issue Feb 28, 2012 · 3 comments
Labels
Bug A confirmed bug in Extensions that needs fixing.

Comments

@yoander
Copy link

yoander commented Feb 28, 2012

if you have enabled DoctrineExtension and you want to generate entities from an existing database executing:
php app/console doctrine:mapping:import BundleName thrown this

[ErrorException]
Warning: class_parents(): Class "CLASS_NAME" does not exist and could not be loaded in Gedmo/Mapping/ExtensionMetadataFactory.php line 80

A work around this is: Disable the extension, do doctrine:mapping:import and later enable the extension But I think the extension is improved with this issue solved.

@l3pp4rd
Copy link
Contributor

l3pp4rd commented Mar 4, 2012

do you use latest version of extensions?

@yoander
Copy link
Author

yoander commented Mar 6, 2012

Yes, Now I tested with:

  • Symfony-2.0.11 Standard with vendors (Doctrine 2.1.6)
  • DoctrineExtensions master-dev
  • Sakila DB (I dit some changes: change enum and blob fields)

Here the exception:php app/console doctrine:mapping:import AcmeDemoBundle annotation

[ErrorException]
Warning: class_parents(): Class Actor does not exist and could not be loaded in /home/yoander/htdocs/Symfony/vendor/DoctrineExtensions/lib/Gedmo/Mapping/ExtensionMetadataFactory.php line 80

doctrine:mapping:import [--em[="..."]] [--filter="..."] [--force] bundle [mapping-type]

This is my config:

imports:
- { resource: parameters.ini }
- { resource: security.yml }
- { resource: doctrine_extensions.yml }

...

Doctrine Configuration

doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8

orm:
    auto_generate_proxy_classes: %kernel.debug%
    auto_mapping: true
    mappings:
        tranlatable:
            type: annotation
            dir: %kernel.root_dir%/../vendor/DoctrineExtensions/lib/Gedmo/Translatable/Entity/MappedSuperclass
            prefix: Gedmo\Translatable\Entity
            alias: Gedmo

parameters.ini

[parameters]
database_driver = pdo_mysql
database_host = localhost
database_port = 3306
database_name = sakila
database_user = root
database_password =

mailer_transport  = smtp
mailer_host       = localhost
mailer_user       =
mailer_password   =

locale            = en

secret            = ThisTokenIsNotSoSecretChangeIt

If I disable teh extension the mapping:import work ok.

@l3pp4rd
Copy link
Contributor

l3pp4rd commented Mar 6, 2012

well then, it needs to be fixed, thanks for the input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A confirmed bug in Extensions that needs fixing.
Projects
None yet
Development

No branches or pull requests

2 participants