Skip to content

Fix: Adjust Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix#311

Merged
localheinz merged 2 commits intomainfrom
fix/namespace
Mar 18, 2026

Conversation

@localheinz
Copy link
Member

@localheinz localheinz commented Mar 18, 2026

This pull request

  • asserts that Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector removes unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix
  • adjusts Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix

@localheinz localheinz self-assigned this Mar 18, 2026
@localheinz localheinz changed the title Fix: Adjust Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to correctly fix references within same and child namespace of namespace prefix Fix: Adjust Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix Mar 18, 2026
…veToNamespacePrefixRector removes unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix
…PrefixRector to remove unnecessary imports without adding a prefix import when the file namespace matches the namespace prefix
@localheinz localheinz merged commit 8940e6e into main Mar 18, 2026
27 checks passed
@localheinz localheinz deleted the fix/namespace branch March 18, 2026 08:20
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.80%. Comparing base (8bf13bd) to head (f1e1e92).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...mespacedSymbolsRelativeToNamespacePrefixRector.php 84.61% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #311      +/-   ##
============================================
- Coverage     84.88%   84.80%   -0.09%     
- Complexity      321      334      +13     
============================================
  Files            10       10              
  Lines          1125     1158      +33     
============================================
+ Hits            955      982      +27     
- Misses          170      176       +6     

☔ 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.

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