You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Trait usage is not factored into the introduction-point check. A class that newly applies a trait will see the trait's methods reported as new on the class.
147
147
- Anonymous classes are skipped.
148
+
- Renaming a class (or moving it to another namespace) is reported as a removal of the old fully-qualified name plus an addition of the new one — there is no rename-pairing heuristic.
148
149
- When a parent class or implemented interface can't be resolved (no `install-dependencies`, or a private repository, or a transient install failure), the introduction-point check defaults to "introduced here" — i.e. methods will be reported even if they actually came from an unresolved parent. This is the conservative direction: rather over-report than miss real API additions.
// Mirrors composer/composer PR #12919: a file and its class are renamed
289
+
// (Version.php/class Version -> VersionRenamed.php/class VersionRenamed).
290
+
// The bodies are identical, so git classifies this as a single rename (R)
291
+
// entry. detect.sh must decompose it (via --no-renames) into a delete +
292
+
// add; otherwise --diff-filter=AMD drops the R entry and neither the old
293
+
// nor the new class reaches the snapshotter.
294
+
$classBody = "{\n public function major(): int { return 1; }\n public function minor(): int { return 2; }\n public function patch(): int { return 3; }\n}\n";
295
+
$this->commit([
296
+
'src/Platform/Version.php' => "<?php\nnamespace L\\Platform;\nclass Version " . $classBody,
297
+
], 'base');
298
+
299
+
// The commit() helper only writes files; remove the old one ourselves so
300
+
// `git add -A` stages the deletion alongside the new file.
0 commit comments