# |
Oct 3rd 2018, 10:45 |
popperz0r |
i placed the get method in here which is the method that gives me the language, but im setting it properly |
# |
Oct 3rd 2018, 10:44 |
popperz0r |
i tought they would be stored in a session yes |
# |
Oct 3rd 2018, 10:42 |
neon1024 |
Also why would a get method set a locale? |
# |
Oct 3rd 2018, 10:42 |
neon1024 |
Isn’t the locale stored in the session? |
# |
Oct 3rd 2018, 10:36 |
popperz0r |
i mean, do i have to set it at every request? |
# |
Oct 3rd 2018, 10:36 |
popperz0r |
Hello again, is `I18n::getLocale()` suposed to not save the set locale? |
# |
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? |