# |
Jul 19th 2017, 09:44 |
hmic |
you still might want to open an issue on your finding as this should work in some way or another |
# |
Jul 19th 2017, 09:43 |
mirec |
I will take a look at it. thanks |
# |
Jul 19th 2017, 09:43 |
ldsign |
Figured it out: $options['association']->getSource()->alias() |
# |
Jul 19th 2017, 09:42 |
hmic |
use assetcompress already! |
# |
Jul 19th 2017, 09:42 |
hmic |
which is more than just ugly! |
# |
Jul 19th 2017, 09:42 |
hmic |
but you still need to rewrite the html |
# |
Jul 19th 2017, 09:41 |
mirec |
no it is minifying only if some change occured. of course it is cached |
# |
Jul 19th 2017, 09:41 |
hmic |
so you open an issue and ask on how to achieve that, without setResponse. maybe you are just missing the new implementation while the $this->request already got the deprecation warning active... |
# |
Jul 19th 2017, 09:40 |
hmic |
especially as you need to do it during every request cycle?! why would you want that? - precompute the minimized things, there is a more than good plugin for that already, for ages! |
# |
Jul 19th 2017, 09:40 |
mirec |
not present... just setRequest |
# |
Jul 19th 2017, 09:40 |
hmic |
this alone sounds like a horrible idea! |
# |
Jul 19th 2017, 09:39 |
hmic |
get/set response instead? |
# |
Jul 19th 2017, 09:39 |
mirec |
It is in component. $this->response is deprecated since 3.4.0 |
# |
Jul 19th 2017, 09:39 |
mirec |
I find all css and js scripts with minify flag, combining them into one file and minify. then I need to remove those scripts from html and append new minified file. should work dynamically |
# |
Jul 19th 2017, 09:39 |
hmic |
like $this->response instead of $this->getController()->response |
# |
Jul 19th 2017, 09:38 |
hmic |
additionally in which context does this shutdown function live in? - you might have a response to reassign to available there, not in the controller context you are getting it from! |
# |
Jul 19th 2017, 09:37 |
hmic |
additionally "returning a response" will stop all the other shutdown functions anyways, from a callback, from any action... relying on this would make your whole code not compatible with lots of plugins. returning a response just says: i'm done. don't do anything else during this request cycle. |
# |
Jul 19th 2017, 09:35 |
hmic |
why are you using the shutdowns to alter the response anyways? |
# |
Jul 19th 2017, 09:35 |
hmic |
if you think it's wrong: open an issue on github, post the link :D |
# |
Jul 19th 2017, 09:34 |
mirec |
it is not desired behavior |
# |
Jul 19th 2017, 09:33 |
mirec |
but then I will omit other shutdown processes going after this one |
# |
Jul 19th 2017, 09:33 |
hmic |
thats what i said - return it |
# |
Jul 19th 2017, 09:32 |
mirec |
hmic: https://pastebin.com/dT38JvKx ... cause of problem is in ActionDispatcher::_invoke, when after shutdownProcess() call there is no response change detection, response is changed only if shutdown process returns response |
# |
Jul 19th 2017, 09:29 |
ldsign |
Hi. How can I call getSource method from an Association in beforeSave? https://api.cakephp.org/3.4/class-Cake.ORM.Association.html |
# |
Jul 19th 2017, 09:26 |
mirec |
give me a sec, I will do some pastebin |
# |
Jul 19th 2017, 09:26 |
hmic |
it's not changing the things you can do, just how you do them |
# |
Jul 19th 2017, 09:25 |
hmic |
just return or reassign instead of change the object |
# |
Jul 19th 2017, 09:25 |
hmic |
because of the immutability |
# |
Jul 19th 2017, 09:25 |
mirec |
why? |
# |
Jul 19th 2017, 09:25 |
hmic |
a feature |
# |
Jul 19th 2017, 09:24 |
mirec |
Response cannot be modified in Controller.shutdown process since using immutable responses... is it bug or feature? |
# |
Jul 19th 2017, 09:06 |
birdy247 |
any ideas? |
# |
Jul 19th 2017, 09:06 |
birdy247 |
suddenly all of my cake namespaces are "undefined" |
# |
Jul 19th 2017, 09:06 |
birdy247 |
using php storm |
# |
Jul 19th 2017, 09:06 |
birdy247 |
I have a cake project |
# |
Jul 19th 2017, 08:52 |
saeideng |
`contain(table1.table2.table3)` |
# |
Jul 19th 2017, 08:51 |
saeideng |
so `contain` return invalid result |
# |
Jul 19th 2017, 08:51 |
saeideng |
`table2` joined filed is nullable and use left join |
# |
Jul 19th 2017, 08:48 |
saeideng |
I think i need to open issue on github :grinning: |
# |
Jul 19th 2017, 08:47 |
maymeow |
@neon1024 Vue can shgow rendered html on yur page with `div v-html="html"></div` |
# |
Jul 19th 2017, 08:46 |
saeideng |
if I remember `table1->hasmany(table2)` and `table2->belongsTo(table3)` |