docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Cannot Configure PHP CodeSniffer in Windows - WSL

Open sreejith-cb opened this issue 1 year ago • 6 comments

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.

sreejith-cb avatar Oct 27 '24 07:10 sreejith-cb

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 👍

markshust avatar Dec 01 '24 20:12 markshust

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[bot] avatar Mar 02 '25 16:03 dosubot[bot]

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?

vpberiya avatar Mar 20 '25 11:03 vpberiya

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

dosubot[bot] avatar Mar 20 '25 11:03 dosubot[bot]

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!

markshust avatar Mar 21 '25 08:03 markshust

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!

dosubot[bot] avatar Jun 20 '25 16:06 dosubot[bot]