spiral / framework

High-Performance PHP Framework
https://spiral.dev
MIT License
1.82k stars 89 forks source link

Enable Auto import Rector config #1144

Closed samsonasik closed 2 months ago

samsonasik commented 2 months ago
Q A
QA? ✔️
samsonasik commented 2 months ago

Ready to merge 👍

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 98.40000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.77%. Comparing base (a21bf32) to head (0464083). Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/Queue/src/QueueManager.php 0.00% 1 Missing :warning:
src/Stempler/src/Parser/Syntax/HTMLSyntax.php 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1144 +/- ## ========================================= Coverage 89.77% 89.77% - Complexity 6491 6495 +4 ========================================= Files 854 854 Lines 18441 18458 +17 ========================================= + Hits 16555 16571 +16 - Misses 1886 1887 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

roxblnfk commented 2 months ago

Hi. Is it possible to disable changes for relative namespaces? In this case, it is preferable to keep relative names, as they convey additional meaning (Internal\... or Config\...).

image

We can also consider collapsing such names into aliases. For example, Config\Proxy -> use ...\Config\Proxy as ProxyConfig. However, I don't think Rector supports this.

samsonasik commented 2 months ago

that's not supported right now, as auto import is really complex process, we check it whether it is conflicted as used by alias as well.

samsonasik commented 2 months ago

Let's close for now then ;)