| 00:01 | shane_aldrich[m] | Or is it "Configuration Rewrite"? |
| 00:01 | mstenta[m] | there's another module called "Config Update UI" or something like that |
| 00:02 | mstenta[m] | which provides a whole bunch of UI features for comparing/diffing/reverting config |
| 00:02 | shane_aldrich[m] | I typed "config" into the filter, and I don't see that one available. |
| 00:03 | mstenta[m] | ah it's "Configuration Update Reports" :-) |
| 00:03 | shane_aldrich[m] | OK. That one is there. Let me try it out really quick... |
| 00:05 | mstenta[m] | With that installed, go to /admin/config/development/configuration/report/type/system.all |
| 00:05 | mstenta[m] | that will show you a full comparison of all config... |
| 00:05 | mstenta[m] | which.... is gonna be a lot :-) |
| 00:06 | mstenta[m] | but if you know what you're looking for (eg: `taxonomy`) just search for that and you should fine it |
| 00:06 | mstenta[m] | find* |
| 00:06 | mstenta[m] | it will probably be under "missing config" |
| 00:07 | mstenta[m] | which shows all config that is defined by modules but is NOT created (so if your taxonomy was deleted, this will allow you to restore it) |
| 00:08 | mstenta[m] | this all assumes that the taxonomy you're trying to recreate is already exported to config in a module though... |
| 00:08 | mstenta[m] | if it's not, then there won't be an option to restore |
| 00:08 | mstenta[m] | but you can create a YML config file and then import that pretty easily |
| 00:09 | shane_aldrich[m] | Cool. I think I found it. Let me try to move around the sit. |
| 00:09 | shane_aldrich[m] | site |
| 00:09 | shane_aldrich[m] | I got it back. Let's see what happens when I enable my module... |
| 00:10 | mstenta[m] | all the stuff in this directory: github.com/s33a/farm_materials/tree/main - defines config that will be installed with the module |
| 00:10 | mstenta[m] | so the Config Updates Report module will give you a summary of what's different between the config defined in your module vs your "installed" config |
| 00:11 | mstenta[m] | this is useful to understand when you make changes to config via the Drupal UI, and then want to "export" those changes back to your module |
| 00:11 | mstenta[m] | a lot of module development can be done simply by creating/modifying these YML config files! |
| 00:11 | shane_aldrich[m] | woo hoo! it worked! I just went to the dashboard, clicked add asset, clicked materials, and everything shows up. |
| 00:12 | shane_aldrich[m] | you should do a quick test yourself 😉 |
| 00:12 | shane_aldrich[m] | gotta break away for about 10 minutes |
| 00:13 | mstenta[m] | can't wait to! finishing up something else this evening - but excited to try it out! |
| 00:18 | shane_aldrich[m] | It's really simple and only has substrates right now. I've got to head out and run some errands. Tomorrow afternoon I'll dive further in to `farm_materials` and `farm_fungi` |
| 00:18 | mstenta[m] | Awesome! ttyl |
| 04:25 | * | farmBOT has joined |
| 20:45 | * | < libera.ems.host/_matrix/media/r0/downloa > |
| 20:47 | mstenta[m] | Oh that's actually fixed upstream! |
| 20:48 | mstenta[m] | We were patching the state machine module to fix a bug, and then they merged our patch |
| 20:49 | mstenta[m] | So the patch doesn't work anymore |
| 20:50 | shane_aldrich[m] | What's the best way for me to update my local site? Remember, I'm not using Docker. Should I create a project in PhpStorm for my farmOS installation, then do a pull request from my updated fork? |
| 20:51 | mstenta[m] | That's a good question :-) |
| 20:51 | shane_aldrich[m] | Crap. That won't work. My fork is based on Docker. |
| 20:51 | mstenta[m] | Not at my computer at the moment and distracted by toddlers |
| 20:52 | shane_aldrich[m] | I used the alpha 2 `tar.gz` to install. No rush. Let me know when you have a lollipop in their mouths. 😂 |
| 20:53 | mstenta[m] | Ha! Used that trick already today |
| 20:53 | mstenta[m] | Ok so you could just download the tar all again |
| 20:54 | mstenta[m] | And avoid doing composer update |
| 20:57 | shane_aldrich[m] | That's fine by me. Installation doesn't take too long. Thanks! |
| 20:59 | mstenta[m] | Shouldn't have to reinstall as long as you keep the sites directory |
| 20:59 | mstenta[m] | docs.farmos.org/hosting/update.html#upda |
| 21:00 | shane_aldrich[m] | I just went to the alpha 2 release page and it says that it was last updated 13 days ago. |
| 21:00 | mstenta[m] | But do you have any changes in the profiles/farm for? |
| 21:00 | mstenta[m] | dir* |
| 21:01 | mstenta[m] | Yep that's when we released alpha 2 |
| 21:01 | shane_aldrich[m] | I don't think I made any changes there. |
| 21:01 | mstenta[m] | That will have the old version of the module and it will be patched already |
| 21:02 | shane_aldrich[m] | Ah! So you packaged the update in there? |
| 21:02 | shane_aldrich[m] | And I still have the `tar.gz` on my wsl2. No need to re-download it. |
| 21:04 | shane_aldrich[m] | Thanks for the link. One question. If I unzip that file with `-xzvf`, will it delete `sites/all`? |
| 21:20 | shane_aldrich[m] | Well, I messed something up. When I extracted the file to my directory, it put all of the files in a new `farmOS` directory inside that one. How can I unzip the file and ignore the top level `farmOS` directory so everything extracts properly? |
| 21:24 | mstenta[m] | > Ah! So you packaged the update in there? |
| 21:24 | mstenta[m] | No, the `state_machine` update happened after we released alpha2... but alpha2 includes the old version of `state_machine` with the old patch - so it will work as intended. |
| 21:25 | mstenta[m] | When alpha3 is released, it will include the new version of `state_machine` |
| 21:25 | mstenta[m] | But that's all fine for your purposes - won't make any difference |
| 21:25 | mstenta[m] | > Thanks for the link. One question. If I unzip that file with `-xzvf`, will it delete `sites/all`? |
| 21:25 | mstenta[m] | Yes most likely it will |
| 21:26 | mstenta[m] | > it put all of the files in a new farmOS directory inside that one |
| 21:26 | mstenta[m] | Ok, so go ahead and delete that |
| 21:27 | mstenta[m] | Then probably easiest thing to do is just move your `sites` directory OUT of the webroot, delete everything (**assuming you don't have anything else you want to save**) and unpack the tarball into the correct place... then delete the new `sites` dir and replace it with your old one |
| 21:27 | mstenta[m] | (Lots of ways to achieve the same thing, but that's probably most sure fire) |
| 21:28 | shane_aldrich[m] | I figured it out. Here is what I used to accomplish removing the `farmOS` directory: `sudo tar -xzvf farmOS-2.0.0-alpha2.tar.gz -C /var/www/shane-farmos.edu/ --strip 1` |
| 21:28 | mstenta[m] | are you using command line to do this? or your operating system's UI? |
| 21:28 | mstenta[m] | oh ok great! haven't used the --strip option before |
| 21:28 | mstenta[m] | did you save your sites dir? |
| 21:28 | shane_aldrich[m] | command line. windows UI doesn't play nice with wsl files. |
| 21:28 | mstenta[m] | one thing to watch out for... described in the docs: |
| 21:28 | mstenta[m] | > Be sure to replace (not merge) all files and directories. |
| 21:29 | mstenta[m] | your tar command probably merges the files... which may not cause any issue for you in this instance... but could result in files that should be deleted remaining |
| 21:30 | mstenta[m] | that's bit others in the past |
| 21:30 | shane_aldrich[m] | I did copy `sites/all` prior to doing this. After extracting with `--strip 1` everything was replaced and left `sites/all` alone. |
| 21:30 | mstenta[m] | so when in doubt, delete all then untar :-) |
| 21:30 | shane_aldrich[m] | In that tar command what should I have used? |
| 21:33 | mstenta[m] | you can just `rm` everything in the webroot directory, then run your `tar` command to unpack the codebase |
| 21:34 | shane_aldrich[m] | it looks like everything is still working. i'll try to do the composer update again and see what happens |
| 21:34 | mstenta[m] | (actually come to think of it maybe tar would complain if the destination wasn't already empty? i forget... i always `rm` first) |
| 21:35 | mstenta[m] | WAIT! haha |
| 21:35 | mstenta[m] | no ... if you `composer update` the same thing will happen |
| 21:36 | mstenta[m] | if you're using packaged releases then you shouldn't be using `composer` |
| 21:36 | shane_aldrich[m] | what? |
| 21:36 | mstenta[m] | there are a few different ways to update farmOS... 1) docker (which you aren't using), 2) packaged releases (which you are using), 3) composer (which is not officially supported yet) |
| 21:37 | mstenta[m] | docs.farmos.org/hosting/update |
| 21:37 | mstenta[m] | > Update the farmOS codebase. This will depend on how you have deployed farmOS. See Updating via Docker or Updating via packaged releases below for specific instructions |
| 21:38 | mstenta[m] | I honestly have never run `composer update` with farmOS |
| 21:38 | shane_aldrich[m] | OK. So if I want to get `phpcs` `phpcbf` and `php-cs-fixer` working with PhpStorm, should I just manually edit the `composer.json` file to require `squizlabs` and `friendsofphp`? |
| 21:39 | mstenta[m] | Ah hmm... so this is where using the Docker image would help - the dev image comes with these already! |
| 21:39 | shane_aldrich[m] | Then run `Update.php` |
| 21:39 | mstenta[m] | But let's see... |
| 21:39 | shane_aldrich[m] | Damn my interest in not using Docker! 😜 |
| 21:40 | mstenta[m] | Sorry... just `phpcs` actually.. I've never used `phpcbf` or `php-cs-fixer` so you're on your own with those |
| 21:40 | mstenta[m] | Alright ... we may want to take a different approach... and basically replicate what the Docker dev image is doing :-) |
| 21:41 | mstenta[m] | github.com/farmOS/farmOS/blob/2.x/docker |
| 21:41 | mstenta[m] | > Damn my interest in not using Docker! 😜 |
| 21:41 | mstenta[m] | Haha well you pay the price by having to set all this up! |
| 21:41 | mstenta[m] | :-P |
| 21:42 | mstenta[m] | Notice how the Dockerfile configures phpcs: github.com/farmOS/farmOS/blob/a00edf93cd |
| 21:42 | shane_aldrich[m] | I guess so! 🤣 |
| 21:42 | shane_aldrich[m] | But I'm learning a lot while doing this. Linux is slowly coming back to me. |
| 21:42 | mstenta[m] | Yea! nothing wrong with that! |
| 21:42 | mstenta[m] | See my approach is: put all this in a Dockerfile and then I can forget about it lol |
| 21:43 | mstenta[m] | Hence why I need to remember all these things :-) |
| 21:44 | shane_aldrich[m] | Ha! I'm going to see what happens with adding the requirements directly in `composer.json` and then running `update.php`. |
| 21:44 | shane_aldrich[m] | Can't hurt. And I can always start fresh since my code is updated on gitHub. |
| 21:45 | mstenta[m] | So... on that note... |
| 21:45 | mstenta[m] | the `composer.json` already has what's needed |
| 21:46 | mstenta[m] | but it's in the `require-dev` section |
| 21:46 | mstenta[m] | which only gets installed if you do `composer install` without the `--no-dev` flag |
| 21:47 | mstenta[m] | > Alright ... we may want to take a different approach... and basically replicate what the Docker dev image is doing :-) |
| 21:47 | mstenta[m] | So... here's another thing to try... if you want to set up the composer approach |
| 21:48 | shane_aldrich[m] | just `nano` 'd `composer.json`, and `phpcs` isn't there. probably because I just overwrote the file and haven't updated yet? |
| 21:48 | mstenta[m] | i believe `phpcs` is pulled in via `drupal/core-dev` |
| 21:49 | shane_aldrich[m] | cool. let me get into a few things and then I'll report back. |
| 21:49 | mstenta[m] | err hmm maybe not... i'm not sure where it gets pulled in from in our dev setup actually |
| 21:50 | mstenta[m] | but yea you could just try `composer require squizlabs/php_codesniffer` |
| 21:50 | mstenta[m] | (no `composer update` necessary) |
| 21:50 | mstenta[m] | dinner time... ttyl! |
| 21:51 | mstenta[m] | ahh i think it gets pulled in via `drupal/coder` |
| 21:51 | mstenta[m] | you might want to require that instead |
| 21:51 | mstenta[m] | that has the drupal coding standards sniffs |
| 21:52 | mstenta[m] | and you'll definitely want to copy the config we have to ensure that our automated tests pass: github.com/farmOS/farmOS/blob/a00edf93cd |
| 21:52 | mstenta[m] | good luck |
| 21:52 | mstenta[m] | ! |
| 21:53 | shane_aldrich[m] | Most of this is just to try and get PhpStorm on windows to use the remote versions of `phpcs` on wsl |
| 22:17 | shane_aldrich[m] | Everything is still working. Turns out that I had my path to `phpcs` and `phpcbf` configured for local, ie `\\wsl$\Ubuntu-20.04\usr\bin\` instead of `/usr/bin/` |
| 22:19 | shane_aldrich[m] | Got to prep dinner. After that, I'll read through the links for the coding standards and see if I need to add the `xml` file to PhpStorm. |
| 22:29 | mstenta[m] | Cool!! |
| 22:46 | shane_aldrich[m] | Which xml files should I be looking for? I know I can add them to PhpStorm for better coding standards. |
| 22:47 | mstenta[m] | Do you mean for the phpcs config? |
| 22:47 | shane_aldrich[m] | yes. Looking for it now |
| 22:49 | mstenta[m] | You can manually create it by copying lines from our Dockerfile |
| 22:49 | mstenta[m] | (link above) |
| 22:49 | mstenta[m] | That basically just creates the file from scratch |
| 22:50 | shane_aldrich[m] | Cool. I was looking for the actual xml file. I'll just create one with that code. |
| 22:50 | mstenta[m] | Ah yea that won't be in the packaged release |
| 22:51 | mstenta[m] | The packaged release doesn't include dev dependencies |
| 22:52 | mstenta[m] | Tip: you *could* consider using Docker to *build* the dev codebase, without using Docker to run farmOS |
| 22:53 | shane_aldrich[m] | Hmmm. Interesting. I know PhpStorm has a Docker plugin. Can you give me a link to help with that? |
| 22:53 | mstenta[m] | Just by running the container with a directory mounted in... If it's empty the docker image will automatically copy the codebase into it |
| 22:53 | mstenta[m] | But maybe not worth it .. if you're getting this working |
| 22:54 | shane_aldrich[m] | You're probably right about that. I'll create the xml file manually first, then look into the Docker stuff over the next few days. |
| 23:02 | shane_aldrich[m] | Where should I save that file? |
| 23:09 | shane_aldrich[m] | And is your xml standard different that what PhpStorm provides for Drupal? GTG... time to cook. Back tomorrow. Take your time. |
| 23:23 | shane_aldrich[m] | Last message for today... Look at these warnings in PhpStorm (only `farm_materials` module project open) and let me know what you think about how to configure things properly: |
| 23:23 | * | uploaded an image: (203KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 23:39 | mstenta[m] | The file basically says: use the Drupal and DrupalPractice rulesets with a few minor exceptions |
| 23:40 | mstenta[m] | I dunno how that compares to what phpstorm supplies |