[v2] namspace to package resolves symlinks with wrong path
When having propel in a vagrant box where you typically have part of your sourcecode in /vagrant to be able to develop on your local machine PropelBundle is going to place the wrong "package" attribute in the schema.
example:
ls -ald /var/www/propelsandbox/src
lrwxrwxrwx 1 www-data www-data 12 Oct 1 17:31 /var/www/propelsandbox/src -> /vagrant/src
In /vagrant/src I have then my bundle files like /vagrant/src/PropelSandbox/. When I have there a /vagrant/src/PropelSandbox/Resources/config/schema.xml
<database name="default" namespace="PropelSandbox\Model">
the result in package of app/cache/*/propel/PropelSandbox-schema.xml is
<database name="default" namespace="PropelSandbox\Model" package="vagrant.src.PropelSandbox.Model">
Which leads to generated files in /var/www/symfony-project/vagrant/src/PropelSandbox/Model. Obviously wrong. Either it needs to place a root . or shouldn't resolve symlinks.
I think I had a pr for this
@jaugustin, would be cool :sunglasses:
Hi @marcj
I found My commit I never had time to create test and a PR https://github.com/pixel-cookers/PropelBundle/commit/88aabd29ae5d68b2f00b56e1f859308d7f689d03
We used it on AWS vm, our vendor dir was a symlink to prevent re-download it on each deploy ;)