vscode-php-cs-fixer icon indicating copy to clipboard operation
vscode-php-cs-fixer copied to clipboard

Case insensitive class

Open cretueusebiu opened this issue 4 years ago • 3 comments

When creating a file Testclass.php and then renaming it to TestClass.php, the extension will rename the class back to Testclass.

bandicam 2022-01-10 14-31-52-815

When running php php-cs-fixer.phar fix TestClass.php it will rename the class to TestClass (the correct way).
So I guess it's a problem with the extension.

This is related to the psr_autoloading rule which I have it set to true.

Is there a cache file maybe I can delete ?

cretueusebiu avatar Jan 10 '22 12:01 cretueusebiu

you can open developer tools to check the args, menu: help -> toggle developer tools

last item of the array is filepath, this filepath got from activeTextEditor.document.uri.fsPath, no cache

junstyle avatar Jan 10 '22 12:01 junstyle

It looks like vscode still reads the file in lowercase even though it the sidebar and Windows Explorer it's renamed. I've cleared the vscode editor and command history, disk cleanup, even restarted my PC.

Screenshot_1

cretueusebiu avatar Jan 10 '22 13:01 cretueusebiu

I had this issue, and the solution for me was to clear the workspace cache in ~/Library/Application Support/Code/User/<workspaceStorage>.

There is this extension that does it for you in case the naming issue appears again.

innocenzi avatar Apr 27 '22 15:04 innocenzi