On 26 Jun 2021 22:44:44, Tim Bates via TextMate wrote:
Does the group have suggestions about a preferred way for a user who just wants it to work without hassles to use going forward?
I switched to using Docker containers for development. It introduces a new level of hassle, but once you learn how to set it up and get your system set up, it's a perfectly seamless way to run multiple projects with different dependences (not just PHP) and never need to install those dependencies on your host OS. I switched to using Docker after PHP 7 was released, when I had to work on PHP 5 and PHP 7 projects simultaneously; trying to maintain multiple versions of PHP, MySQL, et al, and having to re-install them every time I reinstalled macOS was the worst kind of hassle.
I have a custom `php:7.4-apache` image that I build with the PHP extensions I need. Each of my projects has a docker-compose.yml file that is used by `docker compose` to boot two containers: my custom php image, and the standard mariadb image. It also specifies the config for mounting my local development files at /var/www/, and some other environment variables that customize the container's functionality. So I use the same two generic images for all LAMP projects.
One downside is not being able to run PHP cli scripts or mysql commands directly in the mac terminal; you have to run those in a container using `docker exec -it mysqldump`, etc, but that's a minor inconvenience.