- Issue created by @ekes
- last update
9 months ago 25 pass, 2 fail - Status changed to Needs review
9 months ago 4:14pm 24 February 2024 - Status changed to Needs work
9 months ago 5:00pm 24 February 2024 - 🇳🇱Netherlands ekes
Meh. Why did that pass D10.1? In the test setting the $field->value directly doesn't cause the calculation as setValue(). Maybe it should be really.
- First commit to issue fork.
- last update
7 months ago 25 pass, 2 fail - last update
7 months ago 25 pass, 2 fail - last update
7 months ago 25 pass, 1 fail - last update
7 months ago 25 pass, 1 fail - last update
7 months ago 26 pass - 🇮🇹Italy itamair
thanks @ekes for your updates. Going to re-jump and review your last comment asap ...
- last update
6 months ago 22 pass, 2 fail - last update
6 months ago 22 pass, 2 fail - last update
6 months ago 26 pass - last update
5 months ago 26 pass - Status changed to Needs review
5 months ago 2:39pm 3 June 2024 - 🇮🇹Italy itamair
Soo @ekes ...
I better inspected all this, and I ended up with the conviction that is still nice to define a GeofieldItem::isEmpty() method that not only make sure that the geofield primitive/row (WKT) input is not empty but also that it generates a valid /Geometry.
That is correct, and we should keep it, and also the Test code base that assumes it ...What we should rather limit, as you correctly mentioned, is the redundant generation of the same /Geometry in the same GeofieldItem class, to limit the time/memory script overhead and better apply the DRY principle.
That's why in my latest commit a preferred to keep basically unchanged the GeofieldItem::isEmpty() method and rather to define a private \Geometry $geometry property that could be generated once and reused also in the GeofieldItem::populateComputedValues() method.
Tests are still passing nicely with this change and $geo_php_wrapper->load($value) is only called once in the class.
I would commit this that looks a nice improvement to me.
Let me know if you disagree, if you see some issues or potential regressions, or evident mistake with this solution of mine. - 🇮🇹Italy itamair
Well ... I didn't read any feedback to my latest update.
I am feeling my last update / commit is pretty solid, hence I am going to merge this into 8.x-1.x dev, for being part of new upcoming release. - last update
5 months ago 26 pass - Status changed to Fixed
5 months ago 10:28am 18 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.