Skip to content

Commit 6248ea9

Browse files
committed
Make sure we are comparing agains the same API for the same extension
The Clover and RustICL implementation shares similar/same extension names. This causes virtually every features implemented in RustICL to be marked as being added in the last commit since the Clover implementation most likely didn't have them implemented. The getExtensionBySubstr method should probably be removed to avoid misuse but there's another caller in src/Parser/Extension.php that seems to be related to feature dependencies and I'm not really familiar with the logic there.
1 parent 1a2e82a commit 6248ea9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Console/Command/Parse.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,9 @@ private function compareMatricesAndSetModificationCommit(
412412
Commit $commit
413413
): void {
414414
foreach ($matrix->getApiVersions() as $apiVersion) {
415+
$prevApiVersion = $prevMatrix->getApiVersionByName($apiVersion->getName(), $apiVersion->getVersion());
415416
foreach ($apiVersion->getExtensions() as $ext) {
416-
$prevExt = $prevMatrix->getExtensionBySubstr($ext->getName());
417+
$prevExt = $prevApiVersion !== null ? $prevApiVersion->getExtensionBySubstr($ext->getName()) : null;
417418

418419
$this->compareExtensionsAndSetModificationCommit($prevExt, $ext, $commit);
419420
}

0 commit comments

Comments
 (0)