mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 02:18:56 +00:00
[ticket/17459] Add support for deprecated events to md_exporter
PHPBB-17459
This commit is contained in:
parent
555c760a4c
commit
b404606a9f
3 changed files with 79 additions and 3 deletions
|
@ -169,7 +169,7 @@ class md_exporter
|
|||
|
||||
list($file_details, $details) = explode("\n* Since: ", $details, 2);
|
||||
|
||||
$changed_versions = array();
|
||||
$changed_versions = [];
|
||||
if (strpos($details, "\n* Changed: ") !== false)
|
||||
{
|
||||
list($since, $details) = explode("\n* Changed: ", $details, 2);
|
||||
|
@ -184,7 +184,11 @@ class md_exporter
|
|||
else
|
||||
{
|
||||
list($since, $description) = explode("\n* Purpose: ", $details, 2);
|
||||
$changed_versions = array();
|
||||
}
|
||||
|
||||
if (str_contains($since, "\n* Deprecated: "))
|
||||
{
|
||||
list($since, $deprecated) = explode("\n* Deprecated: ", $since, 2);
|
||||
}
|
||||
|
||||
$files = $this->validate_file_list($file_details);
|
||||
|
@ -225,6 +229,7 @@ class md_exporter
|
|||
'event' => $this->current_event,
|
||||
'files' => $files,
|
||||
'since' => $since,
|
||||
'deprecated' => $deprecated ?? '',
|
||||
'changed' => $changes,
|
||||
'description' => $description,
|
||||
);
|
||||
|
@ -451,7 +456,7 @@ class md_exporter
|
|||
{
|
||||
if (!$this->validate_version($since))
|
||||
{
|
||||
throw new \LogicException("Invalid since information found for event '{$this->current_event}'");
|
||||
throw new \LogicException("Invalid since information found for event '{$this->current_event}': {$since}");
|
||||
}
|
||||
|
||||
return $since;
|
||||
|
|
|
@ -18,3 +18,19 @@ acp_bbcodes_actions_prepend2
|
|||
* Changed: 3.1.0-a5 Moved up
|
||||
* Changed: 3.1.0-a6 Moved down
|
||||
* Purpose: desc2
|
||||
|
||||
acp_bbcodes_actions_prepend2_deprecated
|
||||
===
|
||||
* Location: adm/style/acp_bbcodes.html
|
||||
* Since: 3.1.0-a4
|
||||
* Deprecated: 3.1.0-a6
|
||||
* Changed: 3.1.0-a5 Moved up
|
||||
* Changed: 3.1.0-a6 Moved down
|
||||
* Purpose: desc2
|
||||
|
||||
acp_bbcodes_actions_prepend_deprecated
|
||||
===
|
||||
* Location: adm/style/acp_bbcodes.html
|
||||
* Since: 3.1.0-a5
|
||||
* Deprecated: 3.1.0-a6
|
||||
* Purpose: desc2
|
||||
|
|
|
@ -24,6 +24,7 @@ class phpbb_event_md_exporter_test extends phpbb_test_case
|
|||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a3',
|
||||
'deprecated' => '',
|
||||
'changed' => array(
|
||||
'3.1.0-a4' => '',
|
||||
),
|
||||
|
@ -36,6 +37,7 @@ class phpbb_event_md_exporter_test extends phpbb_test_case
|
|||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a5',
|
||||
'deprecated' => '',
|
||||
'changed' => array(),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
|
@ -46,12 +48,38 @@ class phpbb_event_md_exporter_test extends phpbb_test_case
|
|||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a4',
|
||||
'deprecated' => '',
|
||||
'changed' => array(
|
||||
'3.1.0-a5' => 'Moved up',
|
||||
'3.1.0-a6' => 'Moved down',
|
||||
),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
'acp_bbcodes_actions_prepend2_deprecated' => array(
|
||||
'event' => 'acp_bbcodes_actions_prepend2_deprecated',
|
||||
'files' => array(
|
||||
'prosilver' => array(),
|
||||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a4',
|
||||
'deprecated' => '3.1.0-a6',
|
||||
'changed' => array(
|
||||
'3.1.0-a5' => 'Moved up',
|
||||
'3.1.0-a6' => 'Moved down',
|
||||
),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
'acp_bbcodes_actions_prepend_deprecated' => array(
|
||||
'event' => 'acp_bbcodes_actions_prepend_deprecated',
|
||||
'files' => array(
|
||||
'prosilver' => array(),
|
||||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a5',
|
||||
'deprecated' => '3.1.0-a6',
|
||||
'changed' => array(),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
)),
|
||||
array('normal_events.md.test', '3.1.0-a5', '3.1.0-a5', array(
|
||||
'acp_bbcodes_actions_prepend' => array(
|
||||
|
@ -61,6 +89,7 @@ class phpbb_event_md_exporter_test extends phpbb_test_case
|
|||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a5',
|
||||
'deprecated' => '',
|
||||
'changed' => array(),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
|
@ -71,12 +100,38 @@ class phpbb_event_md_exporter_test extends phpbb_test_case
|
|||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a4',
|
||||
'deprecated' => '',
|
||||
'changed' => array(
|
||||
'3.1.0-a5' => 'Moved up',
|
||||
'3.1.0-a6' => 'Moved down',
|
||||
),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
'acp_bbcodes_actions_prepend2_deprecated' => array(
|
||||
'event' => 'acp_bbcodes_actions_prepend2_deprecated',
|
||||
'files' => array(
|
||||
'prosilver' => array(),
|
||||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a4',
|
||||
'deprecated' => '3.1.0-a6',
|
||||
'changed' => array(
|
||||
'3.1.0-a5' => 'Moved up',
|
||||
'3.1.0-a6' => 'Moved down',
|
||||
),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
'acp_bbcodes_actions_prepend_deprecated' => array(
|
||||
'event' => 'acp_bbcodes_actions_prepend_deprecated',
|
||||
'files' => array(
|
||||
'prosilver' => array(),
|
||||
'adm' => array('acp_bbcodes.html'),
|
||||
),
|
||||
'since' => '3.1.0-a5',
|
||||
'deprecated' => '3.1.0-a6',
|
||||
'changed' => array(),
|
||||
'description' => 'desc2' . "\n",
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue