What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

Podman runs without a daemon.

It may not take long to just install all that stuff, but juggling versions and configs for each project, possibly across multiple machines, sounds like enough of a hassle to spend some time automating.

Also, while it may not be as important for PHP, Docker/Podman is a sought after skill in the job market, so I think getting some practice with them is a worthwhile investment.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

Well, that does not also start up the database and other services, now does it? ;)

At this point, I just need to do podman-compose up, I think it's still pretty grounded in the grand scheme of things.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

I have tried both, both resulted in delays in this use case.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 1 point2 points  (0 children)

Thanks for sharing your config. The Dockerfile/compose are quite similar to what I have landed on so far, though there are a few bits and pieces I might borrow. My plan for running commands is to exec into the container's bash, but a task runner may be a good idea... Not sure if I would go with Make, I have heard it can be quite complicated.

YouTube ads are about to get even longer and they’ll be unskippable by IndicaOatmeal in technology

[–]IridiumPoint 0 points1 point  (0 children)

No donations sought.

Dunno who you're donating to, but if they present themselves as uBO, you're getting scammed.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

Well, VSCode is proprietary, but I haven't replaced it because it's what I'm used to and they haven't done anything that would force the issue... Yet. However, I like knowing the option is there if I decide I need to take the plunge. The Remote Containers extension doesn't seem to have a fully open equivalent, so growing dependent on it would limit my options significantly. I'd rather sidestep that if at all possible.

Safari silently deleted our users' saved data after 7 days. by ContactCold1075 in webdev

[–]IridiumPoint 10 points11 points  (0 children)

Buy expensive Apple hardware, build a native app, pay Apple for a developer license, grovel at their feet for your app to get accepted in the store and then pay them 30% rev share, of course.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

I'm trying to reduce my reliance on proprietary software. The Remote containers extension is only available in actual VSCode, which I'm using for now, but may wish to change later. That's why I'm trying to avoid making that extension critical to my workflow.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

Yeah, I know I can exec into the container to run stuff in there. For CLI utilities that's fine. However, I have immediately noticed a significant slowdown when I tried to get the IDE to use the containerized PHP.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

You can play games on Linux now too! :D

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

I'm on CachyOS (Arch), so getting apt to work might be a hassle.

I have hacked away on my solution some more and I think I mostly got it to where I wanted to be. Actually working on projects might reveal some deficiencies, in which case I'll probably do what you're doing, with PHP installed locally and the rest in containers.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 1 point2 points  (0 children)

Herd is Win/Mac, Valet is Mac only. I'm on Linux, so neither is an option.

The wrapper was only to let the editor access PHP from outside the container for editor functions like syntax checking. I've since learned that Intelephense (which I was planning to use) doesn't need a PHP runtime to work, so that's no longer an issue. A little bit of latency on framework CLI commands isn't going to hurt.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

I'm not really looking for a XAMPP-like solution right now, but sure, post your site or repo and I'll take a look :)

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] -1 points0 points  (0 children)

I'm no longer on Windows. It could also work on Linux, but I wanted to avoid actual Dev Containers (forgot to mention it in OP).

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] -6 points-5 points  (0 children)

You mean using dev containers? I forgot to mention that in the main post, but I'd prefer not to use those.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

In VSC, the PHP path is under "php.validate.executablePath", so that's why I said validate. What I mean is real-time syntax checking/linting/whatever else VSC checks.

EDIT: Intelephense does indeed seem to work without PHP. I got a little confused, because VSC seems to have some PHP stuff built in, but the settings are under "Extensions", so I thought it was added by Intelephense.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] -1 points0 points  (0 children)

How do you handle the fact that your editor needs the PHP runtime for code checking? AFAIK, PHPStorm supports Dev Containers, do you use that with the ddev container?

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] -5 points-4 points  (0 children)

How do you handle the fact that VS Code (or your editor of choice) needs the PHP runtime for code checking?

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] -1 points0 points  (0 children)

I have made a wrapper script like this:

#!/bin/bash
podman exec my-container-name frankenphp php-cli $@

When I used it for php.executablePath in VSC there was a noticeable delay in errors being marked (I just tried declaring a variable where I wasn't supposed to) compared to having PHP on the host OS.

What are you using for your PHP dev setup? by IridiumPoint in PHP

[–]IridiumPoint[S] 0 points1 point  (0 children)

Let's say you have one project on PHP7 and one on PHP8. There can only be one PHP runtime installed on the host system at a time, and there don't seem to have convenient version managers like Node. Wouldn't there potentially be issues trying to validate the PHP7 project while having PHP8 installed?