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

[HttpFoundation] Ensure RedisSessionHandler::updateTimestamp returns a boolean #27632

Merged
merged 1 commit into from Jun 19, 2018

Conversation

Projects
None yet
3 participants
@MatTheCat
Contributor

MatTheCat commented Jun 18, 2018

Q A
Branch? 4.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Since v1.1.0 predis doesn't return the result of EXPIRE as a boolean, thus breaking updateTimestamp implementation.

Maybe it's worth mentioning error messages were useless here:

  • Symfony: User Warning: session_write_close(): Failed to write session data with Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler handler
  • PHP: session_write_close(): Session callback expects true/false return value
@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Jun 18, 2018

What's the return type and value now? Any link?

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Jun 18, 2018

@MatTheCat

This comment has been minimized.

Contributor

MatTheCat commented Jun 18, 2018

In my case I get 0 or 1 as an integer. I guess this comes from nrk/predis@b02e3f4

@MatTheCat

This comment has been minimized.

Contributor

MatTheCat commented Jun 19, 2018

Hoping to see this in 4.1.1 😁

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Jun 19, 2018

Thank you @MatTheCat.

@nicolas-grekas nicolas-grekas merged commit 079b944 into symfony:4.1 Jun 19, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Jun 19, 2018

bug #27632 [HttpFoundation] Ensure RedisSessionHandler::updateTimesta…
…mp returns a boolean (MatTheCat)

This PR was merged into the 4.1 branch.

Discussion
----------

[HttpFoundation] Ensure RedisSessionHandler::updateTimestamp returns a boolean

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Since v1.1.0 predis doesn't return the result of `EXPIRE` as a boolean, thus breaking `updateTimestamp` implementation.

Maybe it's worth mentioning error messages were useless here:

- Symfony: `User Warning: session_write_close(): Failed to write session data with Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler handler`
- PHP: `session_write_close(): Session callback expects true/false return value`

Commits
-------

079b944 Ensure updateTimestamp returns a boolean

@fabpot fabpot referenced this pull request Jun 25, 2018

Merged

Release v4.1.1 #27706

@MatTheCat MatTheCat deleted the MatTheCat:redis-session-timestamp branch Jul 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment