# |
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? |
# |
Jul 21st 2017, 11:04 |
neon1024 |
I find it very confusing that a call to var_dump would change the internal state of the object it’s dumping |
# |
Jul 21st 2017, 11:04 |
neothermic |
Something's modifying your scope |
# |
Jul 21st 2017, 11:04 |
neothermic |
@neon1024 Yeah, I'd be wear of magic there |
# |
Jul 21st 2017, 11:03 |
neon1024 |
Is this down to the accursed magic method `__debugInfo` again? |
# |
Jul 21st 2017, 11:03 |
neon1024 |
With both var_dump calls, ln12 is NULL and ln13 is the array I’m expecting |
# |
Jul 21st 2017, 11:02 |
neon1024 |
I’ve encountered a very strange bug in my test, https://pastebin.com/uzXP8FYB, which if I comment out line 12 of my paste, it makes line 13 empty. |
# |
Jul 21st 2017, 11:02 |
jay |
Post on the issue :slightly_smiling_face: would be good to get a different opinion |
# |
Jul 21st 2017, 11:02 |
neothermic |
maybe -t should take something like `all` as an argument, rather than `--all` being a flag |
# |
Jul 21st 2017, 11:01 |
jay |
If you have the ability to rollback migrations to a certain point, then I would expect to be able to rollback from the starting point without having to find the reference |
# |
Jul 21st 2017, 11:01 |
neothermic |
in our context, a new dev starting today would get a copy of the structure from today, not from 2015 :P |
# |
Jul 21st 2017, 11:01 |
jay |
But you shouldn't limit a tool just because a developer might use it wrong, that's down to them |
# |
Jul 21st 2017, 11:00 |
jay |
depends on when the structure was updated, yes. |
# |
Jul 21st 2017, 11:00 |
neothermic |
a fresh environment should be bootstrapped from a modern copy of the structure, not from the starting structure. |
# |
Jul 21st 2017, 10:59 |
jay |
I disagree. You may want to rollback all migrations to test that all migrations run on a fresh environment. You may have rotated your migrations for a new release, and need to test that they all run correctly before releasing to live. etc.. |
# |
Jul 21st 2017, 10:59 |
neothermic |
(I mean, for context, we have 317 migrations in our project since 2015.. if anyone rolled back all of them on live, we'd have to restore from backups!) |
# |
Jul 21st 2017, 10:58 |
neothermic |
but your development env should be mostly faithful to the live env; so if you'd never rollback ALL migrations on live, you shouldn't be doing that on dev, IMO |
# |
Jul 21st 2017, 10:56 |
jay |
I can see the use case in development environments |