Issue #3272956 by xjm, Wim Leers, tedbow, dww: Hardcode security coverage EOL dates for Drupal 9.4 and 9.5 (as was done for 8.8 and 8.9)
parent
c81f543972
commit
96b87dfb70
|
@ -39,11 +39,13 @@ final class ProjectSecurityData {
|
|||
*
|
||||
* @see \Drupal\update\ProjectSecurityRequirement::getDateEndRequirement()
|
||||
*/
|
||||
const SECURITY_COVERAGE_END_DATE_8_8 = '2020-12-02';
|
||||
const SECURITY_COVERAGE_END_DATE_9_4 = '2023-06-21';
|
||||
|
||||
const SECURITY_COVERAGE_ENDING_WARN_DATE_8_8 = '2020-06-02';
|
||||
const SECURITY_COVERAGE_ENDING_WARN_DATE_9_4 = '2022-12-14';
|
||||
|
||||
const SECURITY_COVERAGE_END_DATE_8_9 = '2021-11';
|
||||
const SECURITY_COVERAGE_END_DATE_9_5 = '2023-11';
|
||||
|
||||
const SECURITY_COVERAGE_ENDING_WARN_DATE_9_5 = '2023-05-14';
|
||||
|
||||
/**
|
||||
* The existing (currently installed) version of the project.
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This fixture is used by Drupal\Tests\update\Functional\UpdateSemverCoreTest.
|
||||
|
||||
It contains 2 releases:
|
||||
|
||||
- 10.4.0: testSecurityCoverageMessage() checks EOL date warnings on the Status Report.
|
||||
- 10.5.0: testSecurityCoverageMessage() checks EOL date warnings on the Status Report.
|
||||
|
||||
-->
|
||||
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>Drupal</title>
|
||||
<short_name>drupal</short_name>
|
||||
<dc:creator>Drupal</dc:creator>
|
||||
<supported_branches>10.4.,10.5.</supported_branches>
|
||||
<project_status>published</project_status>
|
||||
<link>http://example.com/project/drupal</link>
|
||||
<terms><term><name>Projects</name><value>Drupal project</value></term></terms>
|
||||
<releases>
|
||||
<release>
|
||||
<name>Drupal 10.5.0</name>
|
||||
<version>10.5.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-10-5-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-10-5-0.tar.gz</download_link>
|
||||
<date>1750424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 10.4.0</name>
|
||||
<version>10.4.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-10-4-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-10-4-0.tar.gz</download_link>
|
||||
<date>1730424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
</releases>
|
||||
</project>
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>Drupal</title>
|
||||
<short_name>drupal</short_name>
|
||||
<dc:creator>Drupal</dc:creator>
|
||||
<api_version>8.x</api_version>
|
||||
<recommended_major>8</recommended_major>
|
||||
<supported_majors>8,9</supported_majors>
|
||||
<default_major>8</default_major>
|
||||
<project_status>published</project_status>
|
||||
<link>http://example.com/project/drupal</link>
|
||||
<terms><term><name>Projects</name><value>Drupal project</value></term></terms>
|
||||
<releases>
|
||||
<release>
|
||||
<name>Drupal 8.9.0</name>
|
||||
<version>8.9.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-8-9-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-8-9-0.tar.gz</download_link>
|
||||
<date>1250424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>drupal 8.9.0-beta2</name>
|
||||
<version>8.9.0-beta2</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-8-9-0-beta2-release</release_link>
|
||||
<download_link>http://example.com/drupal-8-9-0-beta2.tar.gz</download_link>
|
||||
<date>1533298080</date>
|
||||
<terms>
|
||||
<term><name>Release type</name><value>Bug fixes</value></term>
|
||||
<term><name>Release type</name><value>New features</value></term>
|
||||
</terms>
|
||||
<security>
|
||||
Beta releases are not covered by Drupal security advisories.
|
||||
</security>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 8.8.0</name>
|
||||
<version>8.8.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-8-8-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-8-8-0.tar.gz</download_link>
|
||||
<date>1250424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 8.1.0</name>
|
||||
<version>8.1.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-8-1-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-8-1-0.tar.gz</download_link>
|
||||
<date>1250424521</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 8.0.0</name>
|
||||
<version>8.0.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-8-0-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-8-0-0.tar.gz</download_link>
|
||||
<date>1250424521</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
</releases>
|
||||
</project>
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This fixture is used by Drupal\Tests\update\Functional\UpdateSemverCoreTest.
|
||||
|
||||
It contains 2 releases:
|
||||
|
||||
- 9.4.0: testSecurityCoverageMessage() checks EOL date warnings on the Status Report.
|
||||
- 9.5.0: testSecurityCoverageMessage() checks EOL date warnings on the Status Report.
|
||||
|
||||
-->
|
||||
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>Drupal</title>
|
||||
<short_name>drupal</short_name>
|
||||
<dc:creator>Drupal</dc:creator>
|
||||
<supported_branches>9.4.,9.5.</supported_branches>
|
||||
<project_status>published</project_status>
|
||||
<link>http://example.com/project/drupal</link>
|
||||
<terms><term><name>Projects</name><value>Drupal project</value></term></terms>
|
||||
<releases>
|
||||
<release>
|
||||
<name>Drupal 9.5.0</name>
|
||||
<version>9.5.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-5-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-5-0.tar.gz</download_link>
|
||||
<date>1670972400</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 9.4.0</name>
|
||||
<version>9.4.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-4-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-4-0.tar.gz</download_link>
|
||||
<date>1655244000</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
</releases>
|
||||
</project>
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>Drupal</title>
|
||||
<short_name>drupal</short_name>
|
||||
<dc:creator>Drupal</dc:creator>
|
||||
<api_version>9.x</api_version>
|
||||
<recommended_major>8</recommended_major>
|
||||
<supported_majors>8,9</supported_majors>
|
||||
<default_major>9</default_major>
|
||||
<project_status>published</project_status>
|
||||
<link>http://example.com/project/drupal</link>
|
||||
<terms><term><name>Projects</name><value>Drupal project</value></term></terms>
|
||||
<releases>
|
||||
<release>
|
||||
<name>Drupal 9.9.0</name>
|
||||
<version>9.9.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-9-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-9-0.tar.gz</download_link>
|
||||
<date>1250424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>drupal 9.9.0-beta2</name>
|
||||
<version>9.9.0-beta2</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-9-0-beta2-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-9-0-beta2.tar.gz</download_link>
|
||||
<date>1533298080</date>
|
||||
<terms>
|
||||
<term><name>Release type</name><value>Bug fixes</value></term>
|
||||
<term><name>Release type</name><value>New features</value></term>
|
||||
</terms>
|
||||
<security>
|
||||
Beta releases are not covered by Drupal security advisories.
|
||||
</security>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 9.8.0</name>
|
||||
<version>9.8.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-8-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-8-0.tar.gz</download_link>
|
||||
<date>1250424641</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 9.1.0</name>
|
||||
<version>9.1.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-1-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-1-0.tar.gz</download_link>
|
||||
<date>1250424521</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
<release>
|
||||
<name>Drupal 9.0.0</name>
|
||||
<version>9.0.0</version>
|
||||
<status>published</status>
|
||||
<release_link>http://example.com/drupal-9-0-0-release</release_link>
|
||||
<download_link>http://example.com/drupal-9-0-0.tar.gz</download_link>
|
||||
<date>1250424521</date>
|
||||
<terms>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>New features</value>
|
||||
</term>
|
||||
<term>
|
||||
<name>Release type</name>
|
||||
<value>Bug fixes</value>
|
||||
</term>
|
||||
</terms>
|
||||
</release>
|
||||
</releases>
|
||||
</project>
|
|
@ -99,10 +99,12 @@ class UpdateSemverCoreTest extends UpdateSemverTestBase {
|
|||
* - drupal.sec.2.0_9.0.0.xml
|
||||
* - 8.2.0
|
||||
* - 9.0.0
|
||||
* - drupal.sec.9.0.xml
|
||||
* - 8.9.0
|
||||
* - drupal.sec.9.9.0.xml
|
||||
* - 9.9.0
|
||||
* - drupal.sec.9.5.0.xml
|
||||
* - 9.4.0
|
||||
* - 9.5.0
|
||||
* - drupal.sec.10.5.0.xml
|
||||
* - 10.4.0
|
||||
* - 10.5.0
|
||||
*/
|
||||
public function securityCoverageMessageProvider() {
|
||||
$release_coverage_message = 'Visit the release cycle overview for more information on supported releases.';
|
||||
|
@ -182,78 +184,88 @@ class UpdateSemverCoreTest extends UpdateSemverTestBase {
|
|||
],
|
||||
];
|
||||
|
||||
// Drupal 8.8.x test cases.
|
||||
// Drupal 9.4.x test cases.
|
||||
$test_cases += [
|
||||
// Ensure that a message is displayed during 8.8's active support.
|
||||
'8.8.0, supported' => [
|
||||
'installed_version' => '8.8.0',
|
||||
'fixture' => 'sec.9.0',
|
||||
// Ensure that a message is displayed during 9.4's active support.
|
||||
'9.4.0, supported' => [
|
||||
'installed_version' => '9.4.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Checked',
|
||||
'message' => "Covered until 2020-Dec-02 $release_coverage_message",
|
||||
'mock_date' => '2020-06-01',
|
||||
'message' => "Covered until 2023-Jun-21 $release_coverage_message",
|
||||
'mock_date' => '2022-12-13',
|
||||
],
|
||||
// Ensure a warning is displayed if less than six months remain until the
|
||||
// end of 8.8's security coverage.
|
||||
'8.8.0, supported, 6 months warn' => [
|
||||
'installed_version' => '8.8.0',
|
||||
'fixture' => 'sec.9.0',
|
||||
// end of 9.4's security coverage.
|
||||
'9.4.0, supported, 6 months warn' => [
|
||||
'installed_version' => '9.4.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Warnings found',
|
||||
'message' => "Covered until 2020-Dec-02 $update_soon_message $release_coverage_message",
|
||||
'mock_date' => '2020-06-02',
|
||||
'message' => "Covered until 2023-Jun-21 $update_soon_message $release_coverage_message",
|
||||
'mock_date' => '2022-12-14',
|
||||
],
|
||||
];
|
||||
// Ensure that the message does not change, including on the last day of
|
||||
// security coverage.
|
||||
$test_cases['8.8.0, supported, last day warn'] = $test_cases['8.8.0, supported, 6 months warn'];
|
||||
$test_cases['8.8.0, supported, last day warn']['mock_date'] = '2020-12-01';
|
||||
$test_cases['9.4.0, supported, last day warn'] = $test_cases['9.4.0, supported, 6 months warn'];
|
||||
$test_cases['9.4.0, supported, last day warn']['mock_date'] = '2023-06-20';
|
||||
|
||||
// Ensure that if the 8.8 support window is finished a message is
|
||||
// Ensure that if the 9.4 support window is finished a message is
|
||||
// displayed.
|
||||
$test_cases['8.8.0, support over'] = [
|
||||
'installed_version' => '8.8.0',
|
||||
'fixture' => 'sec.9.0',
|
||||
$test_cases['9.4.0, support over'] = [
|
||||
'installed_version' => '9.4.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Errors found',
|
||||
'message' => "$coverage_ended_message $update_asap_message $release_coverage_message",
|
||||
'mock_date' => '2020-12-02',
|
||||
'mock_date' => '2023-06-22',
|
||||
];
|
||||
|
||||
// Drupal 8.9 LTS test cases.
|
||||
$test_cases['8.9.0, lts supported'] = [
|
||||
'installed_version' => '8.9.0',
|
||||
'fixture' => 'sec.9.0',
|
||||
// Drupal 9.5 test cases.
|
||||
$test_cases['9.5.0, supported'] = [
|
||||
'installed_version' => '9.5.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Checked',
|
||||
'message' => "Covered until 2021-Nov $release_coverage_message",
|
||||
'mock_date' => '2021-01-01',
|
||||
'message' => "Covered until 2023-Nov $release_coverage_message",
|
||||
'mock_date' => '2023-01-01',
|
||||
];
|
||||
// Ensure a warning is displayed if less than six months remain until the
|
||||
// end of 9.5's security coverage.
|
||||
$test_cases['9.5.0, supported, 6 months warn'] = [
|
||||
'installed_version' => '9.5.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Warnings found',
|
||||
'message' => "Covered until 2023-Nov $update_soon_message $release_coverage_message",
|
||||
'mock_date' => '2023-05-15',
|
||||
];
|
||||
|
||||
// Ensure that the message does not change, including on the last day of
|
||||
// security coverage.
|
||||
$test_cases['8.9.0, lts supported, last day'] = $test_cases['8.9.0, lts supported'];
|
||||
$test_cases['8.9.0, lts supported, last day']['mock_date'] = '2021-10-31';
|
||||
$test_cases['9.5.0, supported, last day warn'] = $test_cases['9.5.0, supported, 6 months warn'];
|
||||
$test_cases['9.5.0, supported, last day warn']['mock_date'] = '2023-10-31';
|
||||
|
||||
// Ensure that if LTS support window is finished a message is displayed.
|
||||
$test_cases['8.9.0, lts support over'] = [
|
||||
'installed_version' => '8.9.0',
|
||||
'fixture' => 'sec.9.0',
|
||||
// Ensure that if the support window is finished a message is displayed.
|
||||
$test_cases['9.5.0, support over'] = [
|
||||
'installed_version' => '9.5.0',
|
||||
'fixture' => 'sec.9.5.0',
|
||||
'requirements_section_heading' => 'Errors found',
|
||||
'message' => "$coverage_ended_message $update_asap_message $release_coverage_message",
|
||||
'mock_date' => '2021-11-01',
|
||||
'mock_date' => '2023-11-01',
|
||||
];
|
||||
|
||||
// Drupal 9 test cases.
|
||||
$test_cases += [
|
||||
// Ensure the end dates for 8.8 and 8.9 only apply to major version 8.
|
||||
'9.9.0' => [
|
||||
'installed_version' => '9.9.0',
|
||||
'fixture' => 'sec.9.9.0',
|
||||
// Ensure the end dates for 9.4 and 9.5 only apply to major version 9.
|
||||
'10.5.0' => [
|
||||
'installed_version' => '10.5.0',
|
||||
'fixture' => 'sec.10.5.0',
|
||||
'requirements_section_heading' => 'Checked',
|
||||
'message' => "Covered until 9.11.0 $release_coverage_message",
|
||||
'message' => "Covered until 10.7.0 $release_coverage_message",
|
||||
'mock_date' => '',
|
||||
],
|
||||
'9.8.0' => [
|
||||
'installed_version' => '9.8.0',
|
||||
'fixture' => 'sec.9.9.0',
|
||||
'10.4.0' => [
|
||||
'installed_version' => '10.4.0',
|
||||
'fixture' => 'sec.10.5.0',
|
||||
'requirements_section_heading' => 'Warnings found',
|
||||
'message' => "Covered until 9.10.0 Update to 9.9 or higher soon to continue receiving security updates. $release_coverage_message",
|
||||
'message' => "Covered until 10.6.0 Update to 10.5 or higher soon to continue receiving security updates. $release_coverage_message",
|
||||
'mock_date' => '',
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue