mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/12766] Event exporter does not like RCx as version
PHPBB3-12766
This commit is contained in:
parent
3e9d62b9b0
commit
1b0b4cd5e2
3 changed files with 4 additions and 2 deletions
|
@ -227,7 +227,7 @@ class md_exporter
|
||||||
*/
|
*/
|
||||||
public function validate_since($since)
|
public function validate_since($since)
|
||||||
{
|
{
|
||||||
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?$#', $since))
|
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?$#', $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}'");
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,7 +550,7 @@ class php_exporter
|
||||||
public function validate_since($line)
|
public function validate_since($line)
|
||||||
{
|
{
|
||||||
$match = array();
|
$match = array();
|
||||||
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?)$#', ltrim($line, "\t"), $match);
|
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t"), $match);
|
||||||
if (!isset($match[1]))
|
if (!isset($match[1]))
|
||||||
{
|
{
|
||||||
throw new \LogicException("Invalid '@since' information for event "
|
throw new \LogicException("Invalid '@since' information for event "
|
||||||
|
|
|
@ -118,6 +118,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
|
||||||
array('* @since 3.1.0-a1', '3.1.0-a1'),
|
array('* @since 3.1.0-a1', '3.1.0-a1'),
|
||||||
array('* @since 3.1.0-b3', '3.1.0-b3'),
|
array('* @since 3.1.0-b3', '3.1.0-b3'),
|
||||||
array(' * @since 3.1.0-b3', '3.1.0-b3'),
|
array(' * @since 3.1.0-b3', '3.1.0-b3'),
|
||||||
|
array('* @since 3.1.0-RC2', '3.1.0-RC2'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +138,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
|
||||||
array('* @since 3.1.0-a1 bertie is cool'),
|
array('* @since 3.1.0-a1 bertie is cool'),
|
||||||
array('bertie* @since 3.1.0-a1'),
|
array('bertie* @since 3.1.0-a1'),
|
||||||
array('* @since 3.1-A2'),
|
array('* @since 3.1-A2'),
|
||||||
|
array('* @since 3.1.0-rc1'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue