# |
Jul 21st 2017, 12:35 |
neon1024 |
I agree with @chris-andre |
# |
Jul 21st 2017, 12:32 |
neon1024 |
There is a difference between calling it on a table instance and using the global event manager instance |
# |
Jul 21st 2017, 12:31 |
neon1024 |
It’s all about scope |
# |
Jul 21st 2017, 12:24 |
chris-andre |
@adriencs I don't know if it is right, but it works if you add it to your tables initialize method. |
# |
Jul 21st 2017, 11:24 |
neothermic |
Not with that attitude! ;) |
# |
Jul 21st 2017, 11:23 |
neon1024 |
You can’t look for a component to be loaded in a controllers initialize, if you’re attaching it after the initialize :slightly_smiling_face: |
# |
Jul 21st 2017, 11:23 |
neothermic |
@neon1024 https://twitter.com/dave1010/status/613601365529657344 |
# |
Jul 21st 2017, 11:23 |
neon1024 |
Test passes! |
# |
Jul 21st 2017, 11:21 |
neon1024 |
https://www.youtube.com/watch?v=R6kbd3Ne49c |
# |
Jul 21st 2017, 11:21 |
neothermic |
Number one, take us out |
# |
Jul 21st 2017, 11:21 |
neothermic |
Done |
# |
Jul 21st 2017, 11:20 |
neon1024 |
Make it so. |
# |
Jul 21st 2017, 11:20 |
neon1024 |
Yes |
# |
Jul 21st 2017, 11:20 |
neothermic |
@neon1024 in my bug report? :P |
# |
Jul 21st 2017, 11:20 |
neon1024 |
Get some syntax highlighting! |
# |
Jul 21st 2017, 11:19 |
neothermic |
https://github.com/cakephp/phinx/issues/957 for example; I need to write the bugfix for that :P |
# |
Jul 21st 2017, 11:19 |
jay |
https://github.com/jayphp |
# |
Jul 21st 2017, 11:19 |
lorenzo |
@jay what’s your github username? |
# |
Jul 21st 2017, 11:18 |
rogerpro |
It looks like MySQL unsigned attribute is “lost in migration” using Migrations `$ bin/cake bake migration_snapshot Whatever` even that this was supposed to be done in https://github.com/cakephp/migrations/pull/198 |
# |
Jul 21st 2017, 11:18 |
neothermic |
I found some wonderful bugs a while ago WRT indexes and keys |
# |
Jul 21st 2017, 11:18 |
neothermic |
I need to write a few bugfix PRs to PHinx |
# |
Jul 21st 2017, 11:17 |
jay |
With Phinx yeah, we use it heavily here (I work with rquadlling). When I find the time i'd like to help clean up some of the crud and self-assign a few that I can sort. |
# |
Jul 21st 2017, 11:17 |
lorenzo |
what’s your plane? |
# |
Jul 21st 2017, 11:17 |
lorenzo |
I can give you access to the repo |
# |
Jul 21st 2017, 11:16 |
lorenzo |
@jay would you like to help? |
# |
Jul 21st 2017, 11:16 |
jay |
I know, that's why I asked what do I need to do to get maintainer perms :P |
# |
Jul 21st 2017, 11:15 |
cleptric |
Because it’s bad if everyone can add/remove labels as the like ^^ |
# |
Jul 21st 2017, 11:14 |
jay |
What do I need to do to get maintainer perms on that repo? To assign, label issues etc.. |
# |
Jul 21st 2017, 11:13 |
neon1024 |
So yes, it seems that my controller isn’t adding the Auth component properly :slightly_smiling_face: Thanks for the input everyone |
# |
Jul 21st 2017, 11:12 |
jay |
@lorenzo like I say, wasn't having a dig just wanted to help and make sure others are aware it's there :slightly_smiling_face: |
# |
Jul 21st 2017, 11:11 |
lorenzo |
@jay Just responded to that issue |
# |
Jul 21st 2017, 11:10 |
neothermic |
There we go :) |
# |
Jul 21st 2017, 11:10 |
neon1024 |
So perhaps my test is right and my code is wrong! |
# |
Jul 21st 2017, 11:10 |
neon1024 |
As that will automagically add my methods, so my components call to allow() which I”m trying to test becomes irrelevant |
# |
Jul 21st 2017, 11:09 |
neon1024 |
Sidesteps the code I’m trying to test it would seem, https://github.com/cakephp/cakephp/blob/master/src/Controller/Component/AuthComponent.php#L621-L623 |
# |
Jul 21st 2017, 11:09 |
slackebot |
Action: neothermic stabs the ORM in cake2 |
# |
Jul 21st 2017, 11:08 |
neothermic |
so what does allow() do to the data that makes it all work? |
# |
Jul 21st 2017, 11:07 |
neon1024 |
It seems I have to call allow() and then dump allowedActions |
# |
Jul 21st 2017, 11:06 |
cleptric |
Doesn’t look like anything is mutated here |
# |
Jul 21st 2017, 11:06 |
cleptric |
``` public function __debugInfo() { return [ 'components' => $this->components, 'implementedEvents' => $this->implementedEvents(), '_config' => $this->getConfig(), ]; } ``` |
# |
Jul 21st 2017, 11:05 |
cleptric |
Is `$controller->Auth` the right instance? |