0
votes

I copied my sources from my lokal dev (everything works fine) to my repository and from there I did a checkout on my remote dev.

Now when I try to build everything I get this error:

devel:/var/www/myproject# ./symfony doc:build-model

doctrine generating model classes file+ /tmp/doctrine_schema_48726.yml

Warning: file_get_contents(/var/www/myproject/lib/model/doctrine//base/BaseAdvert.class.php): failed to open stream: No such file or directory in /var/www/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php on line 77

Do you know what the problem could be?

Thx for your answers :)

2
I found this doctrine-project.org/jira/browse/DC-143 It seems to be the problem. But I don't want to remove the package definitions. I'm wondering why it works on my other dev environment without these warnings.ownking

2 Answers

1
votes

you can fix this by changing your packagename in schema.yml from

detect_relations: ...
options:
  type: ....

package: yourpackagename

to

package: yourpackagename.foobar

The modelgenerator expects an point in the name of the package

look at your /var/www/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php on line 77

you will find something like this

... isset($definition['package']) ? '/'.substr($definition['package'], 0, strpos($definition['package'], '.'))....
0
votes

I now just removed the package definitions in the schema files, now it works. Doctrine seems to have problem with it. :-/