# |
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)` |
# |
Jul 19th 2017, 08:43 |
saeideng |
if someone use `contain` for nested association(more than 3 table) with different type of association connect |
# |
Jul 19th 2017, 08:40 |
saeideng |
i have a question |
# |
Jul 19th 2017, 08:38 |
neon1024 |
I can only assume it’s the EagerLoader |
# |
Jul 19th 2017, 08:38 |
neon1024 |
Why does a call to `contain()` need a data source configuration? |
# |
Jul 19th 2017, 08:38 |
rogerpro |
Maybe, instead, ->sum() could make the conversion to sum time properly when summing MySQL time fields. Do you think guys that this would success as a PR? |
# |
Jul 19th 2017, 08:38 |
rogerpro |
Those SEC_TO_TIME() and TIME_TO_SEC() functions are not implemented on CakePHP (https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions). |
# |
Jul 19th 2017, 08:37 |
rogerpro |
I need to use SEC_TO_TIME() and TIME_TO_SEC() MySQL functions but then the app becomes not portable to PostgreSQL; so finally I will save and sum seconds. The simples the better :slightly_smiling_face: |
# |
Jul 19th 2017, 08:37 |
slackebot |
SEC_TO_TIME(SUM(TIME_TO_SEC(foo))) FROM test_time_sum; ` |
# |
Jul 19th 2017, 08:37 |
rogerpro |
Hi folks! Just a tip because I spent some time with this: be aware that MySQL is not summing time values as (I) expected. `/* MySQL test_time_sum */ CREATE TABLE test_time_sum ( id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, foo time ); INSERT INTO test_time_sum VALUES (1, ‘00:00:55’), (2, ‘00:00:13’), (3, ‘00:09:51’); /* returns 1019; expected 10:59 */ SELECT SUM(foo) FROM test_time_sum; /* returns 10:59 as expected */ S |