Cannot Configure PHP CodeSniffer in Windows - WSL
Description
I am not able to configure Code Sniffer in PhpStorm. I am using WSL with Windows. I have followed the instructions as mentioned in the video guide "Configure PHPCS (PHP CodeSniffer) for Magento" but to no avail. I believe there is something wrong with the Path mappings. I have configured CLI interpreter and everything as explained in the video.
Expected ResultI PHP CodeSniffer configured successfully.
Actual Result PHP CodeSniffer not configured successfully. Getting error Can not Run PHP_CodeSniffer.
I do not officially support Windows, but if someone wants to make a PR to fix or add documentation to this to get things working, that would be appreciated and I'd take it in 👍
Hi, @sreejith-cb. I'm Dosu, and I'm helping the docker-magento team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You are experiencing difficulties configuring PHP CodeSniffer in PhpStorm on Windows using WSL.
- The issue seems related to path mappings, as the CLI interpreter is set up correctly.
- An error occurs indicating PHP CodeSniffer cannot run.
- Maintainer markshust mentioned that Windows is not officially supported but is open to contributions for a fix or documentation.
Next Steps:
- Please let us know if this issue is still relevant with the latest version of the docker-magento repository by commenting here.
- If there is no further activity, this issue will be automatically closed in 30 days.
Thank you for your understanding and contribution!
Hello @sreejith-cb , Have you added the mapping for the Ubuntu project src folder local path with the remote "/var/www/html" path in the PHP_CodeSniffer dialog box to add the path for mapping?
@markshust, the user @vpberiya has indicated that they still need help with the issue regarding PHP CodeSniffer configuration in PhpStorm on Windows using WSL. They have also provided a suggestion about adding the mapping for the Ubuntu project src folder local path. Could you please assist them?
FYI there is documentation for setting up docker-magento on Linux: https://github.com/markshust/docker-magento?tab=readme-ov-file#linux
I would think you this would needed to be followed with WSL2 — please correct me if I'm wrong!
Hi, @sreejith-cb. I'm Dosu, and I'm helping the docker-magento team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You are experiencing issues configuring PHP CodeSniffer in PhpStorm on Windows using WSL, suspecting path mappings as the root cause.
- @markshust noted that Windows is not officially supported but is open to contributions for a fix or documentation.
- @vpberiya suggested checking the path mapping between the Ubuntu project src folder and the remote path in the PHP_CodeSniffer dialog box.
- @markshust pointed to existing Linux setup documentation, suggesting it might be applicable for WSL2.
Next Steps:
- Please let me know if this issue is still relevant to the latest version of the docker-magento repository by commenting here.
- If no further activity occurs, this issue will be automatically closed in 30 days.
Thank you for your understanding and contribution!