Skip to content

Commit

Permalink
Fix regex matching for removed functions (thecodingmachine#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
shish authored Dec 2, 2024
1 parent d43727a commit 92c0443
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/src/DocPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private function getIsDeprecated(string $file): bool
}
}

if (preg_match('/&warn\.removed\.function-(\d+-\d+-\d+)/', $file, $matches) && isset($matches[2])) {
$removedVersion = $matches[2];
if (preg_match('/&warn\.removed\.function-(\d+-\d+-\d+)/', $file, $matches)) {
$removedVersion = $matches[1];
[$major, $minor] = explode('-', $removedVersion);
if ($major < 7 || ($major == 7 && $minor == 0)) {
return true;
Expand Down

0 comments on commit 92c0443

Please sign in to comment.