8000 [2.2] [HttpFoundation] Add redis session storage by Baachi · Pull Request #4538 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.2] [HttpFoundation] Add redis session storage #4538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

[2.2] [HttpFoundation] Add redis session storage #4538

wants to merge 2 commits into from

Conversation

Baachi
Copy link
Contributor
@Baachi Baachi commented Jun 9, 2012

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This session storage use the redis PHP extension.

@travisbot
Copy link
travisbot commented Jun 9, 2012 8000

This pull request passes (merged 9630dbb into f8a09db).

public static function setUpBeforeClass()
{
if (!extension_loaded('redis')) {
self::markTestSkipped('The "redis" extension must be loaded');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you actually skip in beforeClass ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can skip the test in setUpBeforeClass.
Because, markTestSkipped is a static method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Baachi thanks for the tip I had never taken the time to look at the src code before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vicb No problem :)

Do you have other suggestions?

@travisbot
Copy link

This pull request passes (merged 406a0d6 into f8a09db).

@guilhermeblanco
Copy link
Contributor

@vicb Any plans for getting this in Symfony?

< 8000 div class="pr-review-reactions ">

@bodokaiser
Copy link

What happend actually with the old redis session handler (#3498)?

@Baachi
Copy link
Contributor Author
Baachi commented Jun 24, 2012

@bodokaiser All native session handlers were removed in PR #4454.

@bodokaiser
Copy link

@Baachi Thank you for the fast answer! When does your PR get merged?

@Baachi
Copy link
Contributor Author
Baachi commented Jun 24, 2012

@bodokaiser I don't know.
You should ask one of the organization members.

@vicb
Copy link
Contributor
vicb commented Jun 24, 2012

I don't have much spare time to work on Sf2 this month. Some quick remarks however:

  • New features would probably be integrated in 2.2 only as we now concentrate on fixing current features of 2.1,
  • Why do we need a non-native driver as the Redis extension support native storage ?

The best way would be to configure the native session handler in your php.ini file

@bodokaiser
Copy link

@vicb This doesn't work practically. When I use a plain php file with session_start(); and a configured redis session handler (php.ini) it works. The session gets saved in redis but when I use Symfony the session is handled in another way (redis doesn't have any session values). Correct me if I have forgotten to use custom session settings in config.yml

@vicb
Copy link
Contributor
vicb commented Jun 24, 2012

@Drak has the FrameworkBundle config been updated to support php.ini config ?

@bodokaiser
Copy link

@vicb @stof are there any updates on the issue?

@Baachi
Copy link
Contributor Author
Baachi commented Aug 7, 2012

@stof Should i close this PR?

@Baachi
Copy link
Contributor Author
Baachi commented Sep 18, 2012

ping

@fabpot
Copy link
Member
fabpot commented Sep 18, 2012

We have removed all native session handlers. So, if the native Redis storage as configured in the php.ini does not work, we need to fix it.

@catchamonkey
Copy link
Contributor

I'm using the native session handlers via php.ini in a 2.0 and 2.1 project, both are working.

@fabpot
Copy link
Member
fabpot commented Sep 18, 2012

If they the native session handlers are working, I propose to close this PR.

@ghost
Copy link
ghost commented Sep 18, 2012

@fabpot - yes close it. I'm going to release a bundle with the removed handlers shortly.

@Baachi Baachi closed this Sep 18, 2012
@Baachi
Copy link
Contributor Author
Baachi commented Sep 18, 2012

Closed. :)

nicolas-grekas added a commit that referenced this pull request Feb 4, 2018
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpFoundation] RedisSessionHandler

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24433, #18233, #14539, #4538, #3498
| License       | MIT
| Doc PR        | symfony/symfony-docs#8572

Ability to use Redis as a session storage backend. Discussed in detail in linked issues / PRs.

Commits
-------

8776cce [HttpFoundation] Add RedisSessionHandler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0