Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case insensitive conflict import names cause error #8227

Closed
samsonasik opened this issue Sep 24, 2023 · 0 comments · Fixed by rectorphp/rector-src#5076
Closed

Case insensitive conflict import names cause error #8227

samsonasik opened this issue Sep 24, 2023 · 0 comments · Fixed by rectorphp/rector-src#5076
Assignees
Labels

Comments

@samsonasik
Copy link
Member

Bug Report

Subject Details
Rector version dev-main

Minimal PHP Code Causing Issue

Given the following code:

class Bar 
{
	public static function execute()
    {
    	echo strtolower(\Foo\BaR::execute());
    }
}

It got imported:

-<?php
-
+<?php
+
+use Foo\BaR;
 class Bar 
 {
 	public static function execute()
     {
-    	echo strtolower(\Foo\BaR::execute());
+    	echo strtolower(BaR::execute());
     }
-}
-
+}

which cause error:

Fatal error: Cannot declare class Bar because the name is already in use

see https://3v4l.org/nC7Mq

Expected Behaviour

it should be skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant