Diffs with different line endings leads to Invalid $mode 3 specified

Created on 26 September 2023, over 2 years ago
Updated 25 July 2024, over 1 year ago

Problem/Motivation

Diffs with different line endings lead to InvalidArgumentException : Invalid $mode 3 specified

This is because \Drupal\Component\Diff\DiffOpOutputBuilder::hunkOp does not handle \SebastianBergmann\Diff\Differ::DIFF_LINE_END_WARNING

Steps to reproduce

See unit test in MR.

Can be reproduced in diff module as per this test

Proposed resolution

Ignore line endings or handle them gracefully.

Remaining tasks

Check how line endings were handed in 10.0 and below.

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Base 

Last updated 4 months ago

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024