-
Notifications
You must be signed in to change notification settings - Fork 71
describe cache shouldn’t create all connections#49
describe cache shouldn’t create all connections #49NaderCHASER wants to merge 2 commits intoUnionOfRAD:1.0 from
describe cache shouldn’t create all connections #49Conversation
Thanks for providing a patch for this issue. As this tends to be more like a bugfix, can you please submit against the 1.0 branch and use long array syntax. 1.0 was still PHP <5.4.
* Stays consistent with long array syntax used elsewhere in file / branch.
mariuswilms
commented
Jan 31, 2017
Just had a deeper look into the issue. Wouldn't disabling autoCreate here, lead to none of the connections having schema caching enabled?
NaderCHASER
commented
Feb 1, 2017
You're right. The alternative (previous) approach initiated every connection on every action, though.
I'm not sure how to tackle this yet. The problem lies within the fact that autoConnect defaults to true, leading Connections::get($name) to initiate the connection, regardless of whether or not it's being used for that action. There has to be a way to set autoConnect to false through Connections::get(). I thought it was [ 'config' => [ 'autoConnect' => false ] ] but that didn't appear to work.
mariuswilms
commented
Apr 27, 2017
Sorry for not getting back earlier. Yes, there's no obvious bug fix here, that can be applied to just this repo's code. Looks like we need to dig deeper and probably patch Connections.
Resolves #48