? ? ? Success

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
11 Nov 2014

This allows JSession to be unit testable and provides an interface similar to that in Symfony to allow injection of sessions into the CMS.

It should be b/c for users however so far all I've been able to do is test stuff with core extensions. If you are doing anything outside of core that uses JSession please do test it or let me know of your application!

7c24233 17 Oct 2014 avatar wilsonge WIP
avatar wilsonge wilsonge - open - 11 Nov 2014
avatar jissues-bot jissues-bot - change - 11 Nov 2014
Labels Added: ?
avatar jissues-bot jissues-bot - change - 11 Nov 2014
Labels Added: ?
avatar dgt41
dgt41 - comment - 11 Nov 2014

Sorry George this didn’t work for me
screen shot 2014-11-11 at 9 46 07

avatar wilsonge
wilsonge - comment - 11 Nov 2014

Ahh I'm so sorry. That's what comes of doing this on the plane and not checking through all the bugs I fixed on there. Fixed now. Sorry dude!

avatar dgt41
dgt41 - comment - 11 Nov 2014

That was fast :+1:

avatar wilsonge
wilsonge - comment - 11 Nov 2014

That's because it was already fixed in my local branch :P

avatar dgt41
dgt41 - comment - 11 Nov 2014

Backend: tested most core stuff (menu, articles, categories, modules etc): all good!
Front end: all works fine

Big improvement in loading times in front end! :+1:
About the comment for com_checkin: this seems to be an unrelated problem with debug on!

Didn’t check with 3rd party apps

So far @test is pass

avatar nikosdion
nikosdion - comment - 12 Nov 2014

From an architecture perspective, I like it much better than the current situation in Joomla! 2.x / 3.x :)

However, you are breaking backwards compatibility in the public JSession::getInstance() method. A simple way to maintain b/c would be modifying JSession::getInstance() to check if the last parameter is null, i.e.

if (is_null($handlerInterface))
{
    $handlerInterface = new JSessionHandlerJoomla($options);
}

where $options is fetched... somehow (don't ask me and I won't tell you any lies).

This way existing code will still work and will be interoperable with Joomla! 2.5 and 3.0 through 3.3. I do not have any code using direct instantiation of JSession –I only use JSessionStorage::getInstance to get a storage object and call its gc() method when purging the session– but I suspect that someone, somewhere, possibly in a custom JApplicationWeb application, might be using it.

Then again, if there is no way to fetch $options there should be an informative exception thrown, letting the developer know that they need to instantiate a session handler object. Putting a URL with a short example in the method's DocBlock would work wonders, I assume. And, of course, this kind of b/c breaking behaviour must be documented. Where? I don't know, ask the PLT :)

avatar wilsonge
wilsonge - comment - 12 Nov 2014

I did that in the constructor? I've changed it from the native handler to the Joomla handler though to be b/c like you mentioned.

avatar nikosdion
nikosdion - comment - 12 Nov 2014

Sorry, I was looking at the diff and missed the constructor entirely.

avatar wilsonge
wilsonge - comment - 12 Nov 2014

Don't worry :) If that looks good to you then that makes me feel a lot more relieved :P

avatar wilsonge wilsonge - change - 2 Mar 2015
Milestone Added:
avatar wilsonge wilsonge - change - 2 Mar 2015
Labels Added: ?
avatar wilsonge wilsonge - change - 2 Mar 2015
Labels Added: ?
avatar compojoom compojoom - test_item - 14 Mar 2015 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 6 Jun 2015

@test OK

In an OAuth2 authorization workflow, internal information is saved in JSession. User leaves the site and after the external authorization step, the information is retrieved from JSession to complete the auth token retrieval.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5088.

avatar anibalsanchez anibalsanchez - test_item - 6 Jun 2015 - Tested successfully
avatar zero-24 zero-24 - change - 6 Jun 2015
Status Pending Ready to Commit
avatar zero-24 zero-24 - change - 6 Jun 2015
Category Libraries
avatar zero-24
zero-24 - comment - 6 Jun 2015

RTC based on testing by @anibalsanchez and @compojoom Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5088.

avatar zero-24 zero-24 - change - 6 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 6 Jun 2015
Labels Added: ?
avatar zero-24
zero-24 - comment - 6 Jun 2015

@wilsonge can you update the @since and copyright dates bevor committing?

avatar mbabker
mbabker - comment - 11 Jun 2015

So, as an additional validation on this PR, using the new JSessionHandlerNative class, I am able to get sessions working on PHP 7 (see #7143 for more). With the JSessionHandlerJoomla class, we get nowhere. So :+1: on this.

avatar zero-24 zero-24 - close - 11 Jul 2015
avatar mbabker
mbabker - comment - 11 Jul 2015

Merged to 3.5-dev via e36e879

avatar mbabker mbabker - change - 11 Jul 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-07-11 13:45:11
Closed_By mbabker
avatar mbabker mbabker - close - 11 Jul 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 14 Oct 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment