prefix code with spaces in EntityGenerator #5203

Closed
opened 2026-01-22 15:01:29 +01:00 by admin · 5 comments
Owner

Originally created by @poolerMF on GitHub (Jul 27, 2016).

Originally assigned to: @Majkl578 on GitHub.

hello

class EntityGenerator, function prefixCodeWithSpaces

old condition:

if ( ! empty($value)) {
...
}

suggested condition:

if ( ! empty($value) && $value != "\r") {
...
}
Originally created by @poolerMF on GitHub (Jul 27, 2016). Originally assigned to: @Majkl578 on GitHub. hello class **EntityGenerator**, function **prefixCodeWithSpaces** old condition: ``` if ( ! empty($value)) { ... } ``` suggested condition: ``` if ( ! empty($value) && $value != "\r") { ... } ```
admin added the ImprovementWon't FixInvalid labels 2026-01-22 15:01:29 +01:00
admin closed this issue 2026-01-22 15:01:30 +01:00
Author
Owner

@Ocramius commented on GitHub (Jul 27, 2016):

The fact that you have\r in the codebase seems weird. What would the
reason for the change be?

On 27 Jul 2016 4:54 p.m., "poolerMF" notifications@github.com wrote:

hello

class EntityGenerator, function prefixCodeWithSpaces

old condition:

if ( ! empty($value)) {
...
}

suggested condition:

if ( ! empty($value) && $value != "\r") {
...
}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/doctrine2/issues/5955, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakLmdvny8ZqMa8M_dCIlb1HgbGnuGks5qZ3ERgaJpZM4JWRzp
.

@Ocramius commented on GitHub (Jul 27, 2016): The fact that you have`\r` in the codebase seems weird. What would the reason for the change be? On 27 Jul 2016 4:54 p.m., "poolerMF" notifications@github.com wrote: > hello > > class _EntityGenerator_, function _prefixCodeWithSpaces_ > > old condition: > > if ( ! empty($value)) { > ... > } > > suggested condition: > > if ( ! empty($value) && $value != "\r") { > ... > } > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > https://github.com/doctrine/doctrine2/issues/5955, or mute the thread > https://github.com/notifications/unsubscribe-auth/AAJakLmdvny8ZqMa8M_dCIlb1HgbGnuGks5qZ3ERgaJpZM4JWRzp > .
Author
Owner

@poolerMF commented on GitHub (Jul 27, 2016):

I have custom EntityGenrator, with custom templates ... and now I see the difference ...
I use WINDOWS, so my line separator is CRLF mode

so, becouse someone should have CRLF line separator

@poolerMF commented on GitHub (Jul 27, 2016): I have custom EntityGenrator, with custom templates ... and now I see the difference ... I use WINDOWS, so my line separator is CRLF mode so, becouse someone should have CRLF line separator
Author
Owner

@Ocramius commented on GitHub (Jul 28, 2016):

@poolerMF you should pretty much always get rid of CRLF, and set up your editor, as well as GIT, to strip them.

While I get that it would be interesting in supporting CRLF, I see little point in it, since we'd just support a bad practice then.

EDIT: that's my take on it, will let someone else in the team take a final decision.

@Ocramius commented on GitHub (Jul 28, 2016): @poolerMF you should pretty much always get rid of CRLF, and set up your editor, as well as GIT, to strip them. While I get that it would be interesting in supporting CRLF, I see little point in it, since we'd just support a bad practice then. EDIT: that's my take on it, will let someone else in the team take a final decision.
Author
Owner

@Ocramius commented on GitHub (Jul 28, 2016):

@beberlei can you take a look at this, please?

@Ocramius commented on GitHub (Jul 28, 2016): @beberlei can you take a look at this, please?
Author
Owner

@Majkl578 commented on GitHub (Dec 20, 2017):

EntityGenerator is going to be removed in Doctrine 3.0, thanks for reporting.

@Majkl578 commented on GitHub (Dec 20, 2017): EntityGenerator is going to be removed in Doctrine 3.0, thanks for reporting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5203