From 773147f8bb851d5f78e61bae12ca4d43505322e7 Mon Sep 17 00:00:00 2001 From: James Buncle Date: Thu, 2 Apr 2026 00:34:31 +0100 Subject: [PATCH] Add alias false-positive regressions --- tests/run.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/tests/run.php b/tests/run.php index b84d699..8c19cf7 100644 --- a/tests/run.php +++ b/tests/run.php @@ -870,6 +870,95 @@ class Worker { assertSameValue('Reordering insteadof fallback traits without changing the set should remain PATCH.', 'PATCH', $diff->diff('HEAD', 'WC')->getIncrement()); } + +function testTypeAliasRenamingDoesNotBumpVersion(): void { + $root = createRepository('type-alias-rename-equivalence', [ + 'src/Types.php' => <<<'PHP' +diff('HEAD', 'WC')->getIncrement()); +} + +function testConstantAliasRenamingDoesNotBumpVersion(): void { + $root = createRepository('constant-alias-rename-equivalence', [ + 'src/Config.php' => <<<'PHP' +diff('HEAD', 'WC')->getIncrement()); +} + +function testNamespaceConstantAliasRenamingDoesNotBumpVersion(): void { + $root = createRepository('namespace-constant-alias-rename-equivalence', [ + 'src/Constants.php' => <<<'PHP' +diff('HEAD', 'WC')->getIncrement()); +} + +function testImplementedContractAliasRenamingDoesNotBumpVersion(): void { + $root = createRepository('implements-alias-rename-equivalence', [ + 'src/Worker.php' => <<<'PHP' +diff('HEAD', 'WC')->getIncrement()); +} + function testIncludePathsRestrictTheSurface(): void { $root = createRepository('include-paths', [ 'src/Foo.php' => "