IRC logs for #farmOS, 2022-09-19 (GMT)

2022-09-18
2022-09-20
TimeNickMessage
[21:55:07]* Guest4559 has joined #farmos
[21:55:19]* Guest4559 is now known as owsley
[23:01:58]* ChinchillaWashin has left #farmos ()
[23:18:26]* owsley has quit (Quit: Textual IRC Client: www.textualapp.com)
[23:19:02]* Guest2602 has joined #farmos
[23:33:42]* Guest2602 has quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
[00:58:36]* polo__ has joined #farmos
[01:10:33]* polo__ has quit (Ping timeout: 252 seconds)
[01:11:35]* polo has joined #farmos
[01:31:12]* polo has quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
[01:36:05]* polo has joined #farmos
[01:36:11]* polo has quit (Client Quit)
[07:20:57]<FarmerEd[m]>I keep falling a bit further down the Drupal/PHP rabbit hole lately, but think I'm a bit ill-equipped tools wise.
[07:20:57]<FarmerEd[m]>I've been using a basic text editor with syntax highlighting and a Drupal Devel module.
[07:20:57]<FarmerEd[m]>What tools do you recommended? PHP Storm? any alternatives? or other recommended tools?
[07:22:07]<FarmerEd[m]>I see Eclipse has a PHP IDE too.
[07:22:38]<mstenta[m]>That's a good start! (basic + devel)
[07:22:51]<mstenta[m]>Have you discovered the dpm() function?
[07:23:17]<mstenta[m]>Useful for printing variables out to the screen
[07:23:35]<mstenta[m]>I spent a long time developing with just those!
[07:23:38]<FarmerEd[m]>yes fairly recently
[07:24:01]<mstenta[m]>I use PHPStorm now and love it, but its not free :-/
[07:24:29]<mstenta[m]>I've heard good things about both Eclipse and VSCode but can't really speak to them
[07:24:32]<FarmerEd[m]>Had been posting variables to Node-Red previously :D
[07:25:11]<FarmerEd[m]>probably the bailing twine and pallets approach
[07:25:19]<mstenta[m]>The real power tool is XDebug though. If you can get that working (with whatever IDE) you'll be 🚀
[07:25:43]<mstenta[m]>The farmOS dev docker image comes with it
[07:26:14]<mstenta[m]>I wish I learned to use that a lot earlier than I did
[07:26:16]<FarmerEd[m]>I see that and have the PHP storm trial enabled
[07:26:29]<mstenta[m]>Oh cool!
[07:26:40]<FarmerEd[m]>but probably have a few gaps to fill to get working
[07:26:56]<mstenta[m]>You need to make a slight adjustment to your docker-compose.yml to get it connected
[07:27:18]<mstenta[m]>What OS are you using?
[07:27:30]<FarmerEd[m]>Windows and Linux
[07:27:53]<FarmerEd[m]>Comfortable with either
[07:28:25]<mstenta[m]>I've only set it up with linux, so I'm mostly familiar with that
[07:29:10]<mstenta[m]>There is one small annoyance with linux: you need to update the IP address in docker-compose.yml every time it changes in the docker container
[07:29:29]<mstenta[m]>I think we documented this... let me see...
[07:29:56]<mstenta[m]>https://farmos.org/development/environment/debug/
[07:31:23]<mstenta[m]>Maybe we could get you set up on the dev call :-)
[07:32:25]<FarmerEd[m]>That would be cool if there is time
[07:33:49]<FarmerEd[m]>Think I'm OK with the docker configs.
[07:33:49]<FarmerEd[m]>Probably need more help on the correct configuration of the IDE itself
[07:34:21]<mstenta[m]>The IDE *should* "just work" with that config... you just need to click the little phone icon in the top right of the IDE
[07:34:30]<FarmerEd[m]>But I'll have a play with it over the next few days as well
[07:34:31]<mstenta[m]>to "listen for connections"
[07:35:05]<mstenta[m]>(assuming you're on linux and running the docker dev environment per all the normal instructions)
[07:35:19]<mstenta[m]>(haven't tested other setups)
[07:35:55]<mstenta[m]>a good way to test it is to open Drupal's `web/index.php` and put a breakpoint on the `$response->send();` line
[07:36:12]<mstenta[m]>(or any line really)
[07:36:24]<mstenta[m]>then visit any page in your browser, and it should catch it
[07:37:21]<mstenta[m]>you MAY need to set up a mapping... i forget (basically telling PHPStorm how your local `www/web/index.php` maps to `/opt/drupal/web/index.php` in the container
[07:37:28]<mstenta[m]>* the container)
[07:38:30]<FarmerEd[m]>Just installed the Windows version,
[07:38:30]<FarmerEd[m]>Need to install PHP interpreters for it apparently,
[07:38:30]<FarmerEd[m]>Presume I'll need 7.4 and 8
[07:38:54]<mstenta[m]>Ah hmm
[07:38:57]<mstenta[m]>Yea
[07:40:08]<mstenta[m]>are you using "Docker Desktop" in Windows? Or Windows Subsystem for Linux? (or both? I don't really understand how they relate)
[07:42:01]<FarmerEd[m]>I'm running farmOS on Ubuntu in a VM on my Windows laptop for development
[07:42:11]<mstenta[m]>Ah ok
[07:42:28]<mstenta[m]>So... that will probably add an additional layer to this...
[07:42:32]<FarmerEd[m]>So I can try the Linux version too
[07:42:44]<mstenta[m]>I'm sure it's possible, I just haven't done it that wya
[07:43:28]<mstenta[m]>But I imagine you would need to have a docker volume for the `www` directory AND then also have that in a shared folder so that PHPStorm in Windows can use it
[07:43:36]<mstenta[m]>(maybe you already did that)
[07:44:01]<FarmerEd[m]>If I get it working on Linux I can always figure out any additional layers to work on Windows later.
[07:44:19]<mstenta[m]>cool yea that seems like a good approach - start with what we know works
[07:45:00]<FarmerEd[m]>But yea, I can share the docker folders with Windows and do for file transfer anyway.
[07:45:39]<mstenta[m]>Cool
[07:46:07]<mstenta[m]>(the other curiosity I would have is how file permissions are affected by that... and whether or not any issues would arise from that)
[07:46:39]<mstenta[m]>(I know that has been a snag in the past... Windows<=>Linux file permission issues)
[07:46:58]<FarmerEd[m]>Think maybe I should build a dedicated machine here for development, Laptops drives a bit small and getting choked with VM images. Maybe use a hyperviser.
[07:48:12]<mstenta[m]>I know PHPStorm can work with remote code too... so maybe you could set something up on a server and use your laptop w/ PHPStorm to connect to it
[07:48:17]<mstenta[m]>(after getting it working simply first haha)
[07:48:49]<mstenta[m]>I'm excited to show you some PHPStorm tricks though, once you're up and running 😄
[07:49:07]<FarmerEd[m]>Yea, I'll go with a simple all Linux approach first.
[10:58:11]<evered[m]>I love my penguins
[15:02:27]* Guest4415 has joined #farmos
[15:03:01]* Guest4415 has quit (Changing host)
[15:03:01]* Guest4415 has joined #farmos
[15:03:03]* Guest4415 is now known as money
[15:03:08]* money is now known as polo
[15:06:51]* polo has quit (Quit: My MacBook has gone to sleep. ZZZzzz…)