I
I
Ilya2014-06-22 14:05:56
symfony
Ilya, 2014-06-22 14:05:56

Symfony 2.5 + Doctrine, No Metadata Classes to process error, how to overcome?

I set up a connection to the database on a freshly downloaded symphony (from off site) - everything is ok.
I generate a bundle

php app/console generate:bundle
    Bundle namespace: Test/TestBundle
    Bundle name [TestTestBundle]:
    Target directory [/var/sites/news/src]:
    Configuration format (yml, xml, php, or annotation): php
    Do you want to generate the whole directory structure [no]? yes
    Do you confirm generation [yes]? yes
        Generating the bundle code: OK
        Checking that the bundle is autoloaded: OK
    Confirm automatic update of your Kernel [yes]?
        Enabling the bundle inside the Kernel: OK
    Confirm automatic update of the Routing [yes]?
        Importing the bundle routing resource: OK
    You can now start using the generated code!

Everything is ok, Bundle is created.
Потом php app/console doctrine:database:create
Whether I check the DB is created - yes it is created.
Further
php app/console doctrine:generate:entity
    The Entity shortcut name: TestTestBundle:Test
    Configuration format (yml, xml, php, or annotation) [annotation]: php
    New field name (press <return> to stop adding fields): name
        Field type [string]:
        Field length [255]:
    New field name (press <return> to stop adding fields):
    Do you want to generate an empty repository class [no]? y
        You are going to generate a "TestTestBundle:Test" Doctrine2 entity using the "php" format.
    Do you confirm generation [yes]? y
    Generating the entity code: OK

I check src/Test/TestBundle/Entity 2 files Test.php and TestRepository.php
are created there Then I do:
php app/console doctrine:schema:update --force
which ends with an error:
No Metadata Classes to process.
Tell me why the table is not generated?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Solovyov, 2014-06-22
@u1tr0n

show the entity that symphony generated + try to put the configuration in yml and not in php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question