EC-CUBE / EC-CUBE/ec-cube

MasterテーブルがTraitで拡張できない

Open
#4,325 0 comments 0 reactions 0 assignees View on GitHub
Status: needs-review
Dominant language
PHP
Stars
788
Forks
719
Avg merge
4d 4h
Merged PRs (30d)
39

Description

## 概要(Overview)
プラグインで mtb_pref テーブルに Traitでカラムを追加し、プラグインのインストールを実行したところ、以下のエラーが発生しました。

```
Compile Error: Cannot declare class Eccube\Entity\Master\Pref, because the name is already in use
```

他のEntityと同じように未定義エラーを回避する以下のコードを
src/Eccube/Entity/Master/Pref.php に記述してみたところエラーは発生しなくなりましたが
カラムの追加は出来ませんでした。

```
if (!class_exists('\Eccube\Entity\Master\Pref')) {
}
```

## 期待する内容(Expect) or 要望 (Requirement)
全EntityをTraitで拡張できるようにして欲しい。

### 環境 (environment)
+ EC-CUBE: 4.0.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.