DDC-1280: Generated proxy classes have mixed line endings on Windows #1893

Closed
doctrinebot opened this Issue Jul 17, 2011 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user literal:

When Doctrine\ORM\Proxy\ProxyFactory generates proxy classes on Windows, it mixes LF an CR/LF line endings. This is causing VCS issues in our mixed Windows/Linux dev team (we keep the proxies under version control for deployment purposes).

This seems to be a regression. It did not happen with Doctrine 2.0.x.

It is caused by the template string in the static property $proxyClassTemplate using LF, while the string concatenations in the methods use the PHPEOL constant, which resolves to CR/LF on Windows.

Other code generators like Doctrine\ORM\Tools\EntityGenerator use "\n" instead of PHP_EOL.

I propose to always use "\n" in favour of PHP_EOL. It's easier to implement in this case and every editor/IDE on Windows can handle Unix line endings nowadays.

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment