SessionHandlerInterface::gc returning true is not allowed (contradicts example and session_set_save_handler callable)
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
From manual page: https://php.net/class.sessionhandlerinterface
The SessionHandlerInterface documentation for method gc states that it may only return int|false. It also states in the method gc documentation that it used to also return true before PHP 7.1.
Two things contradict these statements:
- The example code given on the SessionHandlerInterface documentation lets method
gcreturn true - The
session_set_save_handlerdocumentation states that if individual callables are provided, thegccallable must return bool (true or false)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the SessionHandlerInterface documentation and example at https://php.net/class.sessionhandlerinterface with the session_set_save_handler documentation cited in the issue. Determine the consistent return-value wording and update the affected documentation so the method description, example, and callable guidance no longer contradict one another.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100