top-think / top-think/think-orm
虚拟机新系统 Centos 9 框架版本:ThinkPHP V8.1.3 ORM版本: v4.0.50 。 /vendor/topthink/think-orm/src/model/concern/Attribute.php line 592 报错
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
新拉的代码
只进行了以下操作
composer create-project topthink/think tp
拉代码 然后进入tp目录 压缩并解压到上一层目录 在宝塔创建了网站 这时候去拉代码不能搞到当前目录 只能这样子操作
然后 composer install
虚拟机新系统 Centos 9
PHP版本:8.2.8
框架版本:ThinkPHP V8.1.3
ORM版本: v4.0.50 。
然后创建 app/common/model/BaseModel 和 app/common/model/user/User 这两个文件
### 错误1:
以下为User Model内容
以下为BaseModel内容
以下为controller内容
报错内容
然后在baseModel 中添加 protected $mapping = []; 临时解决,再次访问会出现以下问题
然后再次在baseModel 中添加 protected $suffix = ''; 临时解决,再再次访问会出现以下问题
此时的 self::$weakMap 是null ,情况就是这样。不确定你们那边是否能够复现,所以就搞了很多图片。
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 at vendor/topthink/think-orm/src/model/concern/Attribute.php line 592 and review the reported behavior with PHP 8.2.8, ThinkPHP V8.1.3, and ORM v4.0.50. Reproduce the model setup using app/common/model/BaseModel and app/common/model/user/User, then determine why adding protected $mapping and protected $suffix changes the failure and why self::$weakMap is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100