It doesn’t hurt anything in Linux because the PHP interpreter knows what it needs, however I must point out that depending on how you set up GIT, it will sync according to the operating system, even if you manually switch all CRLF to LF, so to facilitate and avoid seeing such messages you could standardize using the file .editorconfig
for all (modern) editors to use the same standard
Inside the document .editorconfig
should look something like:
root = true
[*.{js,css,php,html}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
And for git create a file called .gitattributes
and put something like:
* text=auto
* text eol=lf
In this case the texts will use as LF, because PHP runs as LF on Windows and Linux without problem, as I said the interpreter understands, on .editorconfig
I put an adjustment to the files .md
because markdown sometimes needs spaces until line breaks in some cases, configure that part as you wish:
charset = utf-8 # charset padrão que irá usar em seus arquivos
end_of_line = lf # quebra de linha padrão
insert_final_newline = true # adicionar ou não linha vazia no final do documento
indent_style = space # trocar tabs por espaços
indent_size = 4 # indentação com TAB se torna em 4 espaços (depende de indent_style)