PropelBundle icon indicating copy to clipboard operation
PropelBundle copied to clipboard

[v2] namspace to package resolves symlinks with wrong path

Open marcj opened this issue 11 years ago • 3 comments

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.

marcj avatar Oct 02 '14 16:10 marcj

I think I had a pr for this

jaugustin avatar Oct 02 '14 22:10 jaugustin

@jaugustin, would be cool :sunglasses:

marcj avatar Oct 04 '14 13:10 marcj

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 ;)

jaugustin avatar Nov 25 '14 18:11 jaugustin