# |
Jul 19th 2017, 10:08 |
dereuromark |
also better (strict/less) return types |
# |
Jul 19th 2017, 10:08 |
neon1024 |
Thanks guys, that’s saved me a pull request submission :slightly_smiling_face: |
# |
Jul 19th 2017, 10:08 |
dereuromark |
solving the root issue of having a better interface with clear responsibility separation is a win in many other directions as well. |
# |
Jul 19th 2017, 10:07 |
dereuromark |
hasnt been fixed for years, wont happen anytime soon, but v4 will solve all this by never ever having any $this|... :slightly_smiling_face: |
# |
Jul 19th 2017, 10:07 |
neon1024 |
I agree @dereuromark |
# |
Jul 19th 2017, 10:07 |
neon1024 |
No help here either, https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#715-return |
# |
Jul 19th 2017, 10:07 |
dereuromark |
as $this would be correct :slightly_smiling_face: |
# |
Jul 19th 2017, 10:07 |
dereuromark |
its a phpstorm bug |
# |
Jul 19th 2017, 10:06 |
neon1024 |
`array|self` is fine, as is `array|\Cake\ORM\Query` |
# |
Jul 19th 2017, 10:06 |
dereuromark |
phpstorm still this day has the problem that once you have $this and sth else it completely gets confused, one of the main reasons the setter getter split will 400% improve IDE compatability :slightly_smiling_face: |
# |
Jul 19th 2017, 10:06 |
neon1024 |
Yes |
# |
Jul 19th 2017, 10:06 |
Art_ |
i have a problem with flash messages. I used the same code on two different controllers, but the flash is not displaying on the other one. |
# |
Jul 19th 2017, 10:05 |
dereuromark |
array|$this is the issue |
# |
Jul 19th 2017, 10:05 |
lorenzo |
lol |
# |
Jul 19th 2017, 10:05 |
lorenzo |
we keep going back and forth with`$this` and `self` in the doc blocks |
# |
Jul 19th 2017, 10:01 |
neon1024 |
Perhaps I will PR that |
# |
Jul 19th 2017, 10:01 |
neon1024 |
Ah yes, self works as well |
# |
Jul 19th 2017, 10:00 |
neon1024 |
Perhaps because the IDE assumes that if the return is `$this` then it’s a fluent interface, and thus any other return value is invalid? |
# |
Jul 19th 2017, 10:00 |
neon1024 |
Although I’m not sure that’s worth a PR |
# |
Jul 19th 2017, 09:59 |
neon1024 |
Works fine with , * @return array|\Cake\ORM\Query |
# |
Jul 19th 2017, 09:59 |
neon1024 |
Ah, it doesn’t understand $this |
# |
Jul 19th 2017, 09:58 |
neon1024 |
I’m getting an ‘expected Query’ in my IDE |
# |
Jul 19th 2017, 09:58 |
neon1024 |
Anyone have an idea why PHP Storm doesn’t understand this docblock? https://github.com/cakephp/cakephp/blob/master/src/ORM/Query.php#L376 |
# |
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? |