markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.58k stars 1.01k forks source link

Error with PHPCSF #1181

Closed YevhenZvieriev closed 4 months ago

YevhenZvieriev commented 4 months ago

I am following this tutorial https://courses.m.academy/courses/487758/lectures/52642491 from M.Academy, but I get an error:

Screenshot from 2024-06-24 01-16-27

Before this I get an infinity loop when trying to refactor code:

Screenshot from 2024-06-24 01-16-21

It is my PHPCSF and PHPCS configurations:

Screenshot from 2024-06-23 21-03-53

Screenshot from 2024-06-24 01-15-57

Screenshot from 2024-06-24 01-16-38

I found it can be fixed by installing PHPCS locally instead of Docker.

Has anyone experienced this?

markshust commented 4 months ago

Your screenshots show System PHP, not the phpfpm container settings. It needs to be set to phpfpm, not the system PHP binary.

Also note that you need to choose "Connect to existing container" in one of those configs, as "Always create new container" will add tremendous overhead to the setup, and can cause the issue that you are experiencing. This should all be documented in the course and related lessons.

YevhenZvieriev commented 4 months ago

Hi, @markshust

Really! I changed the Lifecycle from "Always create new container" to "Connect to existing container" and it fixed the infinity loop.

It works for me, thanks!