< 222021-06-23⋎24 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
00:12shane_aldrich[m]So I think it might be related to me not having the xml file loaded there yet. I'll investigate further when I can. Updates to my modules probably won't happen until Thursday.
00:25*posted a file: (1KiB) < libera.ems.host/_matrix/media/r0/downloa >
00:28mstenta[m]That's the config file from my local setup (which was generated in the Dockerfile build)
00:28mstenta[m]It's in the same directory as my `composer.json`
00:31mstenta[m]The Dockerfile runs `/var/farmOS/vendor/bin/phpcs --config-set installed_paths /var/farmOS/vendor/drupal/coder/coder_sniffer` to ensure that the path to the drupal `coder` module is included (you would change `/var/farmOS` to the location of your farmOS directory)
00:31mstenta[m]github.com/farmOS/farmOS/blob/a00edf93cd
00:34mstenta[m]And then to run codesniffer in terminal, you can do: `vendor/bin/phpcs web/profiles/farm` (I think?)
00:35mstenta[m]In the Docker context, you can run codesniffer with: `docker exec -it -u www-data farmos_www_1 phpcs /opt/drupal/web/profiles/farm`
00:37mstenta[m](The `docker exec -it -u www-data farmos_www_1` part is just saying "run this command as the `www-data` user in the `farmos_www_1` container... and then the second part is just the command to run: `phpcs /opt/drupal/web/profiles/farm`, which runs the codesniffer on the farmOS installation profile directory)
00:37mstenta[m] * (The `docker exec -it -u www-data farmos_www_1` part is just saying "run this command as the `www-data` user in the `farmos_www_1` container"... and then the second part is just the command to run: `phpcs /opt/drupal/web/profiles/farm`, which runs the codesniffer on the farmOS installation profile directory)
00:38mstenta[m]This is how I do it locally, and how the automated tests run in GitHub Actions: github.com/farmOS/farmOS/blob/a00edf93cd
00:39mstenta[m]I haven't ever tried hooking it up to run directly in PHPStorm, so I'm not sure what's involved with that
00:42mstenta[m]I actually have a bash alias for it :-)
00:42mstenta[m]`alias fcode='sudo docker exec -it -u www-data farmos_www_1 vendor/bin/phpcs /opt/drupal/web/profiles/farm'`
00:42mstenta[m]So I can just run `fcode` to scan the farmOS codebase I'm working on locally
16:49symbioquine[m]The `farm_map_google` module for 2.x is now functional: github.com/symbioquine/farm_map_google
16:55mstenta[m]Awesome!!!
16:57symbioquine[m]... and its installable via `composer require drupal/farm_map_google`
16:59paul121[m]very nice!!
16:59paul121[m]how can I safely archive my repo ? :-)
16:59symbioquine[m]github.com/symbioquine/farm_map_google/b
16:59symbioquine[m]The main bit that isn't automated is creating the actual installable releases on the drupal.org project - but that's arguably a good thing...
16:59symbioquine[m]<paul121[m] "how can I safely archive my repo"> I don't think there'll be any problem if you just go ahead and archive it :)
17:00symbioquine[m]I think github.com/symbioquine/farm_map_google will continue to say that it was forked from that one, but that's accurate.
22:03shane_aldrich[m]<mstenta[m] "phpcs.xml"> That's the exact code I copied from your Docker link. ;) I have the xml file in PhpStorm as a custom `ruleset` but I'm getting an error: `phpcs: ERROR: Referenced sniff "Drupal" does not exist`
22:04mstenta[m]Oh yes...
22:04mstenta[m]`composer require drupal/coder`
22:05mstenta[m]That should fix it
22:07shane_aldrich[m]What version of coder should I use? Right now I have that in the `composer.json` file as `^8.3.10`. From PhpStorm I can open the `composer.json` file and click install, then it installs all dependencies. But still get the error.
22:08shane_aldrich[m]And it says to open "Open PHPCodeSniffer Inspection Settings"
22:08mstenta[m]> `composer require drupal/coder`
22:08mstenta[m] This should install it
22:08mstenta[m]But I'm getting to the edge of my usefulness here :-)
22:09mstenta[m]Like I said I've never used it directly in phpstorm
22:09mstenta[m]Just command kind y
22:09mstenta[m]Line*
22:10shane_aldrich[m]No worries! This is the last thing I want to configure properly there. Tomorrow is more open for working on the modules.
22:13shane_aldrich[m]Damn. I'm getting the `drupal/state_machine` error again.

< 222021-06-23⋏24 >