Skip to content

Fix: Adjust Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix#316

Merged
localheinz merged 2 commits intomainfrom
fix/remove-prefix-import-when-file-namespace-matches-prefix
Mar 19, 2026
Merged

Fix: Adjust Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix#316
localheinz merged 2 commits intomainfrom
fix/remove-prefix-import-when-file-namespace-matches-prefix

Conversation

@localheinz
Copy link
Member

@localheinz localheinz commented Mar 18, 2026

This pull request

  • add a test to assert that Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector removes import in file where namespace is identical to namespace prefix
  • adjusts Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.02%. Comparing base (9f9c1ba) to head (db20830).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...mespacedSymbolsRelativeToNamespacePrefixRector.php 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #316      +/-   ##
============================================
- Coverage     79.06%   79.02%   -0.05%     
- Complexity      342      344       +2     
============================================
  Files            10       10              
  Lines          1285     1287       +2     
============================================
+ Hits           1016     1017       +1     
- Misses          269      270       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…RelativeToNamespacePrefixRector removes import in file where namespace is identical to namespace prefix
@localheinz localheinz force-pushed the fix/remove-prefix-import-when-file-namespace-matches-prefix branch from 3d9a4ad to 1ae3550 Compare March 19, 2026 16:19
@localheinz localheinz self-assigned this Mar 19, 2026
…Rector to remove imports in file where namespace is identical to namespace prefix
@localheinz localheinz changed the title Fix: Remove prefix import when file namespace matches namespace prefix Fix: Adjust Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove imports in file where namespace is identical to namespace prefix Mar 19, 2026
@localheinz localheinz merged commit 46bbe31 into main Mar 19, 2026
27 checks passed
@localheinz localheinz deleted the fix/remove-prefix-import-when-file-namespace-matches-prefix branch March 19, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants