yiisoft / yiisoft/session

SessionMiddleware can not work on swoole / RR

Open
#25 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:ready for adoption type:bug
Dominant language
PHP
Stars
20
Forks
8
Avg merge
2d 12h
Merged PRs (30d)
2

Description

Hi guys,my application run with swoole, I found I can not use SessionMiddleware because Session will be overwrite by other request.
Could we add Session into attribute of request, so we can use the way $request->getAttribute(SessionInterface::class) to get Session.
We also can remain old usage by add a new property when application running different env.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SessionMiddleware and the current SessionInterface access path, then trace how session state is stored during a request. Verify the behavior under Swoole or RoadRunner with concurrent requests, while preserving the existing usage path for other environments; done means each request retrieves its own session through the request attribute.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.