diff --git a/Classes/Domain/Service/VersionResolver.php b/Classes/Domain/Service/VersionResolver.php index 0a5e2ab..74c2939 100644 --- a/Classes/Domain/Service/VersionResolver.php +++ b/Classes/Domain/Service/VersionResolver.php @@ -7,7 +7,17 @@ class VersionResolver { public function extractVersion(string $migrationClassName): string { - preg_match('#\\Version(\d+)$#', $migrationClassName, $matches); - return $matches[1]; + /* + * date format version number: + * 4 digits year + * + 2 digits month + * + 2 digits day + * + 2 digits hour + * + 2 digits minute + * + 2 digits second + * = 14 digits + */ + preg_match('#\\\\Version(?\\d{14})(\\\\|$)#', $migrationClassName, $matches); + return $matches['dateFormatVersionNumber']; } }