Log message #4169726

# At Username Text
# Oct 3rd 2018, 10:29 neon1024 Is there a nicer way with Phinx migraitons, to execute lots of update queries? Without just having lines and lines of `$this->execute()` ?
# Oct 3rd 2018, 10:27 SteffanxLI git pull
# Oct 3rd 2018, 10:26 SteffanxLI 4.1 ghz on pbo allcore
# Oct 3rd 2018, 10:26 SteffanxLI but then if i try to come up with a polynomial with a sane number of terms that describes "5 of these 10 variables must be 0", i can find papers describing really elaborately constructed arithmetic circuits
# Oct 3rd 2018, 10:10 mdupont What you want is x ~ decode . encode $ x
# Oct 3rd 2018, 10:08 neon1024 Once you’ve written it, don’t forget to edit your `Application.php` to use the new middleware!
# Oct 3rd 2018, 10:07 neon1024 Tip of the hat to ADmad also, as they showed me this technique
# Oct 3rd 2018, 10:07 neon1024 Here you are @birdy247 you can implement your own bits
# Oct 3rd 2018, 10:07 slackebot <neon1024>
# Oct 3rd 2018, 10:05 neon1024 Want me to PR your project? Just $60 p/h :P
# Oct 3rd 2018, 10:04 neon1024 Making my own life easier outweighs a significant number of drawbacks for me
# Oct 3rd 2018, 10:04 birdy247 Could you share the middleware, or is it top secret
# Oct 3rd 2018, 10:03 birdy247 NP
# Oct 3rd 2018, 10:03 neon1024 @birdy247 No idea, sorry
# Oct 3rd 2018, 10:03 birdy247 maybe a little slower?
# Oct 3rd 2018, 10:03 birdy247 @neon1024 are there any drawbacks?
# Oct 3rd 2018, 10:03 neon1024 First level associations are patched automagically, but anything deeper you’d need to pass the `associated` key in the options array
# Oct 3rd 2018, 10:03 martin ah ok
# Oct 3rd 2018, 10:03 neon1024 @martin Depends how you setup your form fields, and how many levels away the associations is and what you put into the patchEntity config
# Oct 3rd 2018, 10:02 martin it does not auto dirty when you add something to the array?
# Oct 3rd 2018, 10:02 slackebot they’re obvious, and thus easier to understand, without being hidden in the web server config
# Oct 3rd 2018, 10:02 neon1024 @birdy247 Yeah, I built a whole mapping thing into the middleware so we could manage them in the middleware. We had a discussion in the office and it was agreed that having the redirects in the application was better than in the server config, for a number of reasons. That they are more relevant in the project code, easier to update, versioned, and don’t require re-running Ansible each time. It also means that a new developer can see them,
# Oct 3rd 2018, 10:02 martin ok now it works :)
# Oct 3rd 2018, 10:01 martin , true
# Oct 3rd 2018, 10:01 martin ok
# Oct 3rd 2018, 10:01 neon1024 @martin Yes it is, you could set the associated property as dirty `$entity->setDirty('examples')`
# Oct 3rd 2018, 10:00 birdy247 so all redirect were done in the middleware?
# Oct 3rd 2018, 10:00 neon1024 Well we used a 301 for some stuff, a 302 for other stuff, and a few we left going through the middleware as 404
# Oct 3rd 2018, 10:00 martin I’m adding something the entity’s “hasMany”. But it does not save it. When I pr() the entity I don’t see the relation dirty. I think this is needed for saving?
# Oct 3rd 2018, 10:00 neon1024 Konami code anyone!?
# Oct 3rd 2018, 09:59 birdy247 301 is the logical
# Oct 3rd 2018, 09:59 slackebot <neon1024>
# Oct 3rd 2018, 09:59 birdy247 lol, I mean response code
# Oct 3rd 2018, 09:59 neon1024 PHP!
# Oct 3rd 2018, 09:59 birdy247 What code did you use?
# Oct 3rd 2018, 09:58 birdy247 People link to us and share on FB, we cant control the pages that are share
# Oct 3rd 2018, 09:51 neon1024 Even if you return a 301 your browser will cache it in most cases and redirect appropriately without the extra request afaik
# Oct 3rd 2018, 09:50 neon1024 Don’t link your Facebook pages to 300s?
# Oct 3rd 2018, 09:50 neon1024 I don’t see how it would though
# Oct 3rd 2018, 09:49 neon1024 @birdy247 We honestly don’t really know, our SEO guy left
# Oct 3rd 2018, 09:42 popperz0r thanks @edgaras.jan :)