# PluginValidationError: unknown hook 'pytest_collection_modifyitems' in plugin <module 'conftest' from '/path/to/conftest.py'>

- **ID:** `python/pytest-missing-plugin-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

conftest.py 中定义了 pytest 不认识的函数名，拼写错误或版本不兼容

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.4.0 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   确保函数名正确，如 pytest_collection_modifyitems 应为 pytest_collection_modifyitems
   ```
2. **** (60% success)
   ```
   pip install --upgrade pytest
   ```

## Dead Ends

- **** — 会丢失所有自定义配置和 fixture (70% fail)
- **** — 如果函数名本身就是自定义的，需要检查是否应该用其他钩子 (40% fail)
