junstyle / vscode-php-cs-fixer

PHP CS Fixer extension for VS Code

Home Page:https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Case insensitive class

cretueusebiu opened this issue · 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 ?

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

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

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.