Add reflection on repeated errors
Key lessons learned: 1. Directory case sensitivity - app/Filament/ not app/filament/ 2. UnitEnum/BackedEnum are PHP 8.2 built-in types, not classes 3. Always verify project structure before making changes 4. Learn from working code instead of assumptions 5. Stop and diagnose thoroughly when issues repeat
This commit is contained in:
parent
2f5c9c9826
commit
9e6b364d46
BIN
composer.phar
Executable file
BIN
composer.phar
Executable file
Binary file not shown.
23
memory/2026-02-03.md
Normal file
23
memory/2026-02-03.md
Normal file
@ -0,0 +1,23 @@
|
||||
# 2026-02-03 - 每日记忆
|
||||
|
||||
## 关键错误反思
|
||||
|
||||
### 错误 1: 目录大小写混淆
|
||||
- **问题**: 项目使用 `app/Filament/` (大写 F),我一直修改 `app/filament/` (小写 f)
|
||||
- **影响**: 所有修改都写在错误的目录下,完全无效
|
||||
- **教训**: 必须先检查项目结构,确认正确的路径再修改
|
||||
|
||||
### 错误 2: 错误的 import 语句
|
||||
- **问题**: 一直添加 `use BackedEnum;` 和 `use UnitEnum;`
|
||||
- **事实**: 这些是 PHP 8.2 内置的枚举类型,不是类,不需要 import
|
||||
- **影响**: 导致类加载失败,类型检查一直报错
|
||||
- **教训**: 查看现有代码学习,参考可以正常工作的文件 (SupplierResource.php)
|
||||
|
||||
### 错误 3: 重复犯同样错误
|
||||
- **问题**: 用户多次指出问题,我没有真正理解就继续修改
|
||||
- **影响**: 浪费大量时间,重复犯同样错误
|
||||
- **教训**: 停下来彻底诊断,理解根本原因,然后一次性正确修复
|
||||
|
||||
---
|
||||
|
||||
美羊羊 🐑
|
||||
Loading…
Reference in New Issue
Block a user