app/Resources/config/resources.yaml に設定を追加しても期待した動作をしない
- Dominant language
- PHP
- Stars
- 788
- Forks
- 719
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 45
Description
## 概要(Overview)
```yaml
services:
# 既存の ProductRepository を拡張
Customize\Repository\ProductRepository:
decorates: Eccube\Repository\ProductRepository
```
app/Customize/config/resources.yaml に、上記設定を追加して動かすと、
`Type error: Too few arguments to function Customize\Repository\ProductRepository::__construct(), 0 passed`
というエラーが発生する。
`app/config/eccube/services.yaml` の末尾に追記するとエラーが発生せず期待通りの動作をする。
`Customize\Repository\ProductRepository` は `Eccube\Repository\ProductRepository` を継承。
## 期待する内容(Expect) or 要望 (Requirement)
`app/config/eccube/services.yaml` の末尾に追記したときと同じ動作をしてほしい。
## 再現手順(Procedure)
`Eccube\Repository\ProductRepository` を継承した Repository を作成し、`app/config/eccube/services.yaml` に設定を追加。
### 環境 (environment)
+ Docker: php:7.3-apache-buster
+ EC-CUBE: 4.0.4
+ PHP: 7.3.18
+ DB:
- MySQL 5.7.30
## 関連情報 (Ref)
Contributor guide
Research direction
Start by reproducing the error with a repository extending Eccube\Repository\ProductRepository and the service definition in app/Customize/config/resources.yaml. Compare this with the same definition appended to app/config/eccube/services.yaml, then trace the service configuration loading path. Done means both locations produce the expected behavior without the constructor argument error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100