It seems the only usage of \SebastianBergmann\Diff\Differ::NO_LINE_END_EOF_WARNING is in \SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilder and \SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder, neither of which are used in core. This means we will never see this warning.
This differs from \SebastianBergmann\Diff\Differ::DIFF_LINE_END_WARNING as that is called from \SebastianBergmann\Diff\Differ::diffToArray which is called in \Drupal\Component\Diff\Diff::__construct.
I think we can leave it as is for now where \Drupal\Component\Diff\DiffOpOutputBuilder::hunkOp will throw an InvalidArgumentException.
It's worth noting how
\SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder
handles this:Essentially treats the warning as "not changed".
We may also want to handle "Differ::NO_LINE_END_EOF_WARNING".
should we handle that here too then?
It seems the only usage of
\SebastianBergmann\Diff\Differ::NO_LINE_END_EOF_WARNING
is in\SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilder
and\SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder
, neither of which are used in core. This means we will never see this warning.This differs from
\SebastianBergmann\Diff\Differ::DIFF_LINE_END_WARNING
as that is called from\SebastianBergmann\Diff\Differ::diffToArray
which is called in\Drupal\Component\Diff\Diff::__construct
.I think we can leave it as is for now where
\Drupal\Component\Diff\DiffOpOutputBuilder::hunkOp
will throw an InvalidArgumentException.