All contributions

dedoc/scramble

Scramble

An OpenAPI (Swagger) documentation generator for Laravel. It builds the API description from the application code and needs no PHPDoc annotations.

Language
PHP
GitHub stars
2,239
Merged changes
1
Project site
scramble.dedoc.co

What we changed

The summary and description of an endpoint's PHPDoc comment now split correctly in files with CRLF line endings, as saved on Windows.

What this work shows

  • PHPDoc block parsing
  • CRLF and LF line endings
  • OpenAPI documentation in Laravel
  • Pest tests with datasets
What was broken

The whole comment landed in the summary

The summary was split from the description on two newline characters in a row, which a CRLF file never contains. In controllers saved with Windows line endings, the whole PHPDoc block ended up in the endpoint summary.

How we fixed it

Line endings normalised before the split

PhpDoc::addSummaryAttributes now turns CRLF into LF before it splits the text. A new Pest test checks the same comment with LF and with CRLF.

#1271

Merged change 1

  1. #1271 Fix PhpDoc summary and description split for CRLF files Merged 13 September 2026

What it taught us

When parsing text we normalise line endings before looking for a blank line, because a CRLF file never contains two newline characters in a row. A Pest test run for both LF and CRLF backs the fix.

More about this technology: PHP

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.