top-think / top-think/think-orm
2021-29 日提交的 "改进withAttr方法" 会导致模型无法被序列化
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
今天composer update了一下, 突然发现系统登录不了了, debug半天发现是 think\session\Store 序列化报错了
报错内容:
Serialization of 'Closure' is not allowed
试了一下Cache果然也是报这个...
v2.0.47 和 v2.0.46 这两版本都有这个问题
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
Start by comparing the withAttr change associated with v2.0.46 and v2.0.47, then reproduce serialization through think\session\Store and Cache after composer update. Done means the affected models can be serialized without the "Serialization of 'Closure' is not allowed" error and login and cache operations work again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100