Skip to content

Normalize line endings in DocumentationGenerator and TestCase to use "\n"#36

Open
ToonDG wants to merge 1 commit intoromanzipp:masterfrom
ToonDG:fix-line-endings-bug
Open

Normalize line endings in DocumentationGenerator and TestCase to use "\n"#36
ToonDG wants to merge 1 commit intoromanzipp:masterfrom
ToonDG:fix-line-endings-bug

Conversation

@ToonDG
Copy link

@ToonDG ToonDG commented Apr 9, 2025

Hi, I'm using Windows, but my codebase uses \n line endings, instead of the Windows default of \r\n. Therefore, when running php artisan model-doc:generate, I get "Failed: ... Can not find class declaration" for each model.

Your DocumentGenerator function writeDoc, currently uses PHP_EOL to split the lines. I think it is safer to user \n for this. In the same function you also split $docblock by PHP_EOL, but docblock was generated using \n.

In this PR I changed PHP_EOL into \n in th DocumentatoinGenerator and TestCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments