mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1280: Generated proxy classes have mixed line endings on Windows #1611
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jul 17, 2011).
Originally assigned to: @beberlei on GitHub.
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 PHP_EOL 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 commented on GitHub (Jul 26, 2011):
Comment created by @beberlei:
Fixed
@doctrinebot commented on GitHub (Jul 26, 2011):
Issue was closed with resolution "Fixed"