Skip to content

Cannot Configure PHP CodeSniffer in Windows - WSL #1237

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

Open
sreejith-cb opened this issue Oct 27, 2024 · 5 comments
Open

Cannot Configure PHP CodeSniffer in Windows - WSL #1237

sreejith-cb opened this issue Oct 27, 2024 · 5 comments

Comments

@sreejith-cb
Copy link

sreejith-cb commented Oct 27, 2024

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.
image
image
image
image

Expected ResultI
PHP CodeSniffer configured successfully.

Actual Result
PHP CodeSniffer not configured successfully. Getting error Can not Run PHP_CodeSniffer.

@markshust
Copy link
Owner

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 👍

Copy link

dosubot bot commented Mar 2, 2025

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!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Mar 2, 2025
@vpberiya
Copy link

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?

@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Mar 20, 2025
Copy link

dosubot bot commented Mar 20, 2025

@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?

@markshust
Copy link
Owner

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!

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

No branches or pull requests

3 participants