---
title: "Scramble: PHPDoc parsing in CRLF files in PHP | VulCode"
description: "In Scramble, an OpenAPI documentation generator for Laravel, we fixed in PHP how PHPDoc splits into summary and description in files with CRLF line endings."
url: "https://vulcode.com/en/opensource/contributions/scramble"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/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.

[See the repository](https://github.com/dedoc/scramble) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: PHP
- **GitHub stars**: 2,239
- **Merged changes**: 1
- **Project site**: [scramble.dedoc.co](https://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](https://github.com/dedoc/scramble/pull/1271)

## Merged change 1

- [#1271 Fix PhpDoc summary and description split for CRLF files Merged 13 September 2026](https://github.com/dedoc/scramble/pull/1271)

## 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](https://vulcode.com/en/technologies/php)

## Other projects we write code for

- [**Composer** PHP · 29,590 stars The dependency manager for PHP: it installs and updates a project's libraries from its composer.json.](https://vulcode.com/en/opensource/contributions/composer)

- [**PHPMailer** PHP · 22,347 stars The classic PHP library for sending email, used by WordPress and many other systems.](https://vulcode.com/en/opensource/contributions/phpmailer)

- [**Monolog** PHP · 21,407 stars A PHP logging library that sends records to files, sockets, inboxes, databases and web services. Symfony and Laravel use it, among others.](https://vulcode.com/en/opensource/contributions/monolog)

- [**Carbon** PHP · 16,583 stars A PHP DateTime extension for working with dates, standard in the Laravel ecosystem.](https://vulcode.com/en/opensource/contributions/carbon)

- [**Whoops** PHP · 13,231 stars A PHP library that turns uncaught exceptions into a readable error page with the stack trace, known from Laravel.](https://vulcode.com/en/opensource/contributions/whoops)

- [**ramsey/uuid** PHP · 12,642 stars A PHP library for generating universally unique identifiers (UUIDs).](https://vulcode.com/en/opensource/contributions/ramsey-uuid)

## Describe your project.

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

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
