Normally, application is bootstrapped after request being created. But in a test environment it happens before creating request.
That leads to socialiteproviders/manager
implicitly creating request here, thinking it already exists. This request doesn't get used, and the other one is created after that.
As a result, I can't forge session data with withSession
helper. Since it changes session created for latter request. And SocialiteProviders' provider always gets empty session.
If I disable bootstrapping it here, the first error I get is at this line, since application has not being bootstrapped yet.
Who's at fault? And how to fix it? And can you think of any workarounds meanwhile?
P.S. More details here.
Well, if I had to answer who's at fault, I'd say it's
socialiteproviders/manager
, since it makes an assumption that request is already created when application is being bootstrapped. And here's the solution the way I see it.To use it you add
to
repositories
parameter ofcomposer.json
. And doDo note though, using extra repositories slows
composer
down.