The diff engine allows you to configure how much context you want to display using the diff_context_lines_leading and diff_context_lines_trailing variables, but the variable system will not be available in Drupal 8.

Proposed resolution

Convert the following lines to use CMI:
1099 $this->leading_context_lines = variable_get('diff_context_lines_leading', 2);
1100 $this->trailing_context_lines = variable_get('diff_context_lines_trailing', 2);

There is no UI to set these variables.

Remaining tasks

User interface changes

API changes

This is a child of #1775842: [meta] Convert all variables to state and/or config systems

#6 2102499-6.patch894 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 58,733 pass(es).
[ View ]
#3 2102499-3.patch734 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 58,869 pass(es).
[ View ]


If this is going to stay a component, it should use settings rather than state.

Title:Convert DiffEngine to CMIConvert DiffEngine to settings
Priority:Normal» Critical

Status:Active» Needs review
new734 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,869 pass(es).
[ View ]

Status:Needs review» Needs work

That's still calling a Drupal function from Drupal-agnostic code (see #2)

settings() is just wrapper for Settings::getSingleton() (which is in Component\Utility), we can use that.

Status:Needs work» Needs review
new894 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,733 pass(es).
[ View ]

Ok, this then.

Status:Needs review» Reviewed & tested by the community

Ok, let's do this. I don't want to look at this file anymore ;)

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

Status:Fixed» Reviewed & tested by the community

Looks like you forgot to push.

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.