| 05:16 | symbioquine[m] | Ignoring the question of whether it's worthwhile to implement support for complex queries like these, I'd welcome any feedback about whether there's a better way to do this; github.com/symbioquine/farmOS_wfs/blob/7 |
| 14:37 | * | margoaron has joined |
| 14:41 | * | _margoaron has joined |
| 14:42 | * | margoaron has quit (Ping timeout: 264 seconds) |
| 16:08 | symbioquine[m] | <mstenta[m] "symbioquine: XDebug ALSO updated"> Do you still have a link for these environment var changes handy? I seem to remember XDebug just kind of working for me in the past... |
| 16:09 | mstenta[m] | yes! one sec... |
| 16:09 | symbioquine[m] | No rush :) |
| 16:09 | mstenta[m] | github.com/farmOS/farmOS/blob/32effe4dc6 |
| 16:09 | mstenta[m] | i updated the dev docker-compose.yml template to include them |
| 16:09 | mstenta[m] | and the docs: |
| 16:10 | mstenta[m] | 2x.farmos.org/development/environment/de |
| 16:10 | mstenta[m] | and here's the diff: github.com/farmOS/farmOS/commit/9bb7d4f8 |
| 16:11 | mstenta[m] | took some fiddling to figure it out, but i think it makes sense... lemme know if you have trouble |
| 16:11 | symbioquine[m] | Should I infer that those changes aren't expected to be needed with the 7.x-1.x devel image? |
| 16:11 | mstenta[m] | (the one that's easy to miss is `remote_host` is now `client` inside the `XDEBUG_CONFIG` env var) |
| 16:12 | mstenta[m] | correct - at least i think that's true... i think we only updated in the 2.x image |
| 16:13 | symbioquine[m] | I seem to remember Eclipse just kind of auto-magically connecting to XDebug - even though I wasn't using it. Now I'm trying to use it, I can't seem to get that to happen... grrr :) |
| 16:13 | symbioquine[m] | I'll check the IP thing. |
| 16:15 | mstenta[m] | yea it was frustrating to get it working again for me |
| 16:15 | mstenta[m] | check your xdebug version to see if you're on 2/3 |
| 16:15 | mstenta[m] | they also changed the default port from 9000 to 9003 (eye roll emoji) |
| 16:18 | mstenta[m] | I use PHPStorm, and they published a blog post about the change, which was helpful |
| 16:18 | mstenta[m] | blog.jetbrains.com/phpstorm/2020/11/phps |
| 16:19 | mstenta[m] | PHPStorm listens on both 9000 and 9003 by default now |
| 16:19 | * | sent a long message: < matrix.org/_matrix/media/r0/download/mat > |
| 16:19 | mstenta[m] | oh dang. that's 7.x-1.x image? |
| 16:19 | mstenta[m] | :-( |
| 16:20 | mstenta[m] | wonder if we can just pin it to v2 |
| 16:20 | mstenta[m] | github.com/farmOS/farmOS/blob/42a8a730ad |
| 16:20 | symbioquine[m] | <mstenta[m] "oh dang. that's 7.x-1.x image?"> Yes, the only special thing is I'm using a version I built including github.com/farmOS/farmOS/pull/385 |
| 16:21 | mstenta[m] | yea - makes sense that it would be using xdebug 3 now too... we're basically just doing `pecl install xdebug` |
| 16:21 | mstenta[m] | this was a pretty disruptive change IMO |
| 16:22 | mstenta[m] | (@paul121 said he saw a lot of stackoverflow posts flooded in when they did it too - so we're not alone) |
| 16:22 | symbioquine[m] | I think we just need to change that to something like `pecl install xdebug-2.9.8`... |
| 16:22 | symbioquine[m] | I'll try it... |
| 16:23 | mstenta[m] | awesome - yea i say we just pin 7.x-1.x on xdebug 2 and move forward with xdebug 3 for 2.x |
| 16:24 | symbioquine[m] | As long as there aren't too glaring of security problems I suppose |
| 16:26 | mstenta[m] | yea |
| 16:26 | mstenta[m] | although if it's just in the dev image that's not too critical |
| 16:29 | * | sent a long message: < matrix.org/_matrix/media/r0/download/mat > |
| 16:29 | symbioquine[m] | I'll send a PR... |
| 16:29 | mstenta[m] | woo hoo! |
| 16:29 | mstenta[m] | thanks symbioquine |
| 16:30 | symbioquine[m] | Well I haven't tested that it fixed XDebug for me yet... I guess I should do that too... |
| 16:30 | symbioquine[m] | it did |
| 16:30 | mstenta[m] | huzzah! |
| 16:32 | mstenta[m] | > Ignoring the question of whether it's worthwhile to implement support for complex queries like these, I'd welcome any feedback about whether there's a better way to do this; github.com/symbioquine/farmOS_wfs/blob/7 |
| 16:32 | mstenta[m] | PS this is awesome!! |
| 16:32 | mstenta[m] | Using EntityFieldQuery makes sense to me! |
| 16:32 | symbioquine[m] | Thanks! |
| 16:33 | mstenta[m] | And with regard to 2.x... EntityFieldQuery goes away... but the native entity API is basically the same thing - and even better IMO |
| 16:33 | mstenta[m] | EntityFieldQuery in D7 was sort of a bolt-on after thought |
| 16:33 | symbioquine[m] | I was figuring it would be something like that. |
| 16:33 | symbioquine[m] | Needs to be something filling that niche. |
| 16:34 | mstenta[m] | yea - and i'd be happy to help translate these with you for 2. |
| 16:34 | mstenta[m] | * yea - and i'd be happy to help translate these with you for 2.x |
| 16:35 | mstenta[m] | i'm working on the asset location logic right now in my `2.x-location` branch - coming along nicely! |
| 16:35 | symbioquine[m] | yay! |
| 16:38 | symbioquine[m] | github.com/farmOS/farmOS/pull/391 |
| 16:41 | mstenta[m] | symbioquine: Drupal 9 uses Symfony's service container, which could be a really nice way for us to have "swappable" geometry logic - to leverage PostGIS if/when it's available |
| 16:42 | mstenta[m] | eg: i could imagine a service (which is just a class w/ interface) that has the `EntityFieldQuery` code you're working on |
| 16:42 | mstenta[m] | and a `postgis` module that, if enabled (only if you have postgis), replaces the service class with another one, which uses direct postgis queries instead |
| 16:43 | symbioquine[m] | Yeah, makes sense |
| 16:43 | mstenta[m] | (maybe just one way of doing it... probably others) |
| 16:43 | mstenta[m] | i'm basically going to use that approach with the "Group" logic |
| 16:43 | mstenta[m] | eg: we'll have an `asset.location` service for getting an asset's current location/geometry |
| 16:44 | mstenta[m] | and if the `group` module is enabled, it will replace the class with one of it's own, which also takes into account asset group membership |
| 16:44 | mstenta[m] | (that's the current thought anyway - i think it will work) |
| 16:45 | symbioquine[m] | It's a decorator I assume? |
| 16:45 | symbioquine[m] | i.e. checks for a "group location" and if there isn't one, it delegates to the original location service? |
| 16:45 | mstenta[m] | yup! |
| 16:46 | symbioquine[m] | cool! |
| 16:46 | mstenta[m] | in theory :-) |
| 16:46 | mstenta[m] | this will solve the weird conundrum we have right now where an asset can have movements, and also be in a group with movements (where is the asset??) |
| 16:47 | mstenta[m] | the thought is: it will basically include the group's movement logs, so whichever one is the "latest" will take precedence in determining location |
| 16:47 | mstenta[m] | so you could still move an asset separately from a group, while still being part of the group |
| 16:47 | mstenta[m] | (eg: if a cow gets sick and moves to quarantine or something, but is still a member of the herd) |
| 16:47 | symbioquine[m] | ah, yeah that would get a bit tricky to do in the decorator pattern. |
| 16:48 | mstenta[m] | mm yea... might need to think it through some more... getting there :-) |
| 16:48 | mstenta[m] | the location stuff i'm working on now is the bulk of the work... hopefully adding the group logic next will be easier |
| 16:48 | symbioquine[m] | Maybe instead of the service being a "location service" it's a movement history service? |
| 16:49 | symbioquine[m] | So the decorator can modify the query results to add it's own history events... |
| 16:49 | mstenta[m] | ah hmm yea that's an idea |
| 16:50 | mstenta[m] | actually that's not too far off from what i have |
| 16:50 | symbioquine[m] | nice |
| 16:50 | mstenta[m] | i actually have a location service and a general purpose log query service |
| 16:50 | mstenta[m] | (location service is ALSO used for "fixed" assets, so movements aren't always part of that logic) |
| 16:52 | mstenta[m] | and so: yea... maybe the log query service (or an extension of it) can become a more general purpose "movement history service" in that regard too |
| 16:52 | mstenta[m] | which the location service uses |
| 16:52 | symbioquine[m] | yeah |
| 16:54 | mstenta[m] | (the log query service is a little more specific than just a service for loading logs... it is sort of specific to farmOS's model of "finding latest log that references an asset at a particular time") |
| 16:54 | mstenta[m] | this is what it looks like to "find the latest movement log": |
| 16:55 | * | sent a long message: < matrix.org/_matrix/media/r0/download/mat > |
| 16:55 | mstenta[m] | (the `$options` array is just a helper that gets parsed by `getQuery()` to add standard conditions) |
| 16:55 | mstenta[m] | similar to `farm_log_query()` in 1.x |
| 19:12 | mstenta[m] | Huzzah! My asset location tests are passing :-) |
| 19:12 | mstenta[m] | (still more to do... but it's working!) |
| 20:43 | * | _margoaron has quit (Ping timeout: 265 seconds) |
| 21:05 | * | margoaron has joined |
| 21:36 | * | cpm has quit (Quit: Leaving) |