# |
Sep 10th 2019, 13:49 |
admad |
@dereuromark i skimmed through it. If i understand it correctly with proper use of those annotations psalm could for e.g. warn user if they use `$this->response->withFoo()` in controller and fail to return / assign the method's return value. |
# |
Sep 10th 2019, 13:42 |
admad |
psalm should become the defacto static analyzer for PHP. Matt Brown's development pace is awesome. |
# |
Sep 10th 2019, 13:41 |
admad |
i got the release notification, haven't read the article yet :slightly_smiling_face: |
# |
Sep 10th 2019, 13:39 |
dereuromark |
@admad If you're bored^^ https://psalm.dev/articles/immutability-and-beyond |
# |
Sep 10th 2019, 13:34 |
neon1024 |
I fixed the title :slightly_smiling_face: |
# |
Sep 10th 2019, 13:33 |
neon1024 |
Here we are, feel free to edit if you need to https://github.com/cakephp/cakephp/issues/13638 |
# |
Sep 10th 2019, 13:28 |
admad |
above i said `addBehavior()` by mistake, the association methods `hasOne()` etc. :slightly_smiling_face: |
# |
Sep 10th 2019, 13:24 |
neon1024 |
Righto |
# |
Sep 10th 2019, 13:24 |
neon1024 |
Or er, both perhaps? |
# |
Sep 10th 2019, 13:24 |
admad |
core, first the properties need to be assinged |
# |
Sep 10th 2019, 13:23 |
neon1024 |
Open it against the core or bake? |
# |
Sep 10th 2019, 13:23 |
neon1024 |
Of course. We were discussing why PHP Storm doesn’t add the `$` and discussions turned instead, to why Cake doesn’t just declare class properties right in the Table class |
# |
Sep 10th 2019, 13:21 |
admad |
@neon1024 mind opening an issue for this for 4.x? |
# |
Sep 10th 2019, 13:18 |
admad |
maybe `addBehavior()` should set the property like `loadModel()` does |
# |
Sep 10th 2019, 13:18 |
admad |
actually, my bad. It doesn't set the associations as properties, they are fetched using magic `__get()` |
# |
Sep 10th 2019, 13:14 |
admad |
it should, have you declared them? |
# |
Sep 10th 2019, 13:14 |
neon1024 |
Rather than having to use `@property` |
# |
Sep 10th 2019, 13:14 |
neon1024 |
Y |
# |
Sep 10th 2019, 13:13 |
admad |
@neon1024 it does, but since the properties are added dynamically your IDE doesn't "see" them |
# |
Sep 10th 2019, 11:22 |
neon1024 |
Why don’t Table classes define associations as class properties? |
# |
Sep 10th 2019, 11:21 |
neon1024 |
Wales, Scotland and NI will leave the union |
# |
Sep 10th 2019, 11:20 |
neon1024 |
Ronald Dump will use his Greenland fund to buy England |
# |
Sep 10th 2019, 11:20 |
neon1024 |
We’ll become a subsiduary of the USA soon |
# |
Sep 10th 2019, 11:20 |
neon1024 |
From running an Empire which spanned most of the globe to a bickering childish embarassment |
# |
Sep 10th 2019, 11:19 |
neon1024 |
They wheel out the “Will of the people” too, when it’s actually the “Will of 52% of the people” |
# |
Sep 10th 2019, 11:19 |
neon1024 |
Pretty much spot on |
# |
Sep 10th 2019, 11:19 |
neon1024 |
Lol |
# |
Sep 10th 2019, 11:17 |
admad |
@neon1024 https://i.redd.it/i30s7h2hnpl31.jpg |
# |
Sep 10th 2019, 11:03 |
dereuromark |
Wow, that bug was opened 4 years ago? :slightly_smiling_face: I wonder if they ever fix it. Should we have either a code sniffer or IdeHelper auto fix it? |
# |
Sep 10th 2019, 11:00 |
neon1024 |
This look right to anyone? Or have a screwed up somewhere? |
# |
Sep 10th 2019, 11:00 |
slackebot |
<neon1024> |
# |
Sep 10th 2019, 10:58 |
neon1024 |
I thought I’d set it to 30 minutes, as per the book in `app.php`, but it’s timing out whilst I’m coding, and it’s frustrating |
# |
Sep 10th 2019, 10:58 |
neon1024 |
So, session timeout. Mine is short. I want it long, so so very long |
# |
Sep 10th 2019, 10:47 |
slackebot |
<neon1024> |
# |
Sep 10th 2019, 10:44 |
neon1024 |
@spriz For me they’re underlined in a yellow colour, and I just alt+click them and select the `Add @property` option |
# |
Sep 10th 2019, 10:39 |
spriz |
how can you even make phpstorm put those `@property`? |
# |
Sep 10th 2019, 10:39 |
ndm |
You are late to the party https://youtrack.jetbrains.net/issue/WI-28522 |
# |
Sep 10th 2019, 10:30 |
neon1024 |
I can use Marks ide helper to fix them, but feels like something php storm should be able to do |
# |
Sep 10th 2019, 10:22 |
neon1024 |
It generates them like this `* @property \App\Model\Table\AuditsTable Audits` |
# |
Sep 10th 2019, 10:22 |
neon1024 |
Does anyone know how I can force PHPStorm to add the `@property` docblock but including the `$` for the variable? |
# |
Sep 10th 2019, 10:15 |
dereuromark |
If you do that on App level it will automatically always use your helper everywhere without further changes needed. |