Skip to content
Snippets Groups Projects
Commit a733e5eb authored by James Shields's avatar James Shields Committed by Chris Wells
Browse files

Issue #3423697 by sime, lostcarpark, phenaproxima, chrisfromredfin: GitLab CI...

Issue #3423697 by sime, lostcarpark, phenaproxima, chrisfromredfin: GitLab CI - test for previous and next minor versions, and maximum PHP version
parent 1a69a14b
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,11 @@ variables:
_PHPUNIT_CONCURRENT: '1'
_PHPUNIT_TESTGROUPS: ''
# Broaden test coverage.
OPT_IN_TEST_PREVIOUS_MINOR: 1
OPT_IN_TEST_NEXT_MINOR: 1
OPT_IN_TEST_MAX_PHP: 1
################
# Require composer checks to pass.
################
......
......@@ -10,7 +10,7 @@
"ext-simplexml": "*"
},
"require-dev": {
"drupal/automatic_updates": "^3",
"drupal/automatic_updates": "^3.1.2",
"colinodell/psr-testlogger": "^1.2"
},
"conflict": {
......
......@@ -3,6 +3,7 @@
namespace Drupal\project_browser\Controller;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Component\Utility\DeprecationHelper;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\TempStore\SharedTempStore;
......@@ -319,13 +320,14 @@ class InstallerController extends ControllerBase {
$generated_url->applyTo($url_with_csrf_token_placeholder);
$renderer = \Drupal::service('renderer');
// @todo Remove this if statement, and everything below it, when Drupal
// <10.3 support is dropped.
if (method_exists($renderer, 'renderInIsolation')) {
return (string) $renderer->renderInIsolation($url_with_csrf_token_placeholder);
}
// @phpstan-ignore-next-line
return (string) $renderer->renderPlain($url_with_csrf_token_placeholder);
$output = DeprecationHelper::backwardsCompatibleCall(
currentVersion: \Drupal::VERSION,
deprecatedVersion: '10.3',
currentCallable: fn() => $renderer->renderInIsolation($url_with_csrf_token_placeholder),
deprecatedCallable: fn() => $renderer->renderPlain($url_with_csrf_token_placeholder),
);
return (string) $output;
}
/**
......
......@@ -24,12 +24,9 @@ class CoreExperimentalLabelTest extends KernelTestBase {
/**
* Tests 'Core (Experimental)' label.
*
* This test will fail if 'Workspaces' is removed, made non-experimental,
* or if the language for experimental modules has changed.
* If it is reason 1 or 2, the test may be fixed by changing 'Workspaces'
* to another module that is currently experimental. If it's reason 3,
* we need to update `DrupalCore::projectIsCovered` to look for the new
* language that indicates a module is experimental.
* This test will fail if the language for experimental modules has changed.
* If it fails, we need to update `DrupalCore::projectIsCovered` to look for
* the new language that indicates a module is experimental.
*
* @covers ::getProjectData
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment