HogeEntityのレポジトリHogeRepositoryを作ったところ、Make sure the service exists and is tagged with “doctrine.repository_service”.と怒られエラーが発生した。
The “\Customize\Repository\HogeRepository” entity repository implements “Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryInterface”, but its service could not be found. Make sure the service exists and is tagged with “doctrine.repository_service”.
原因は@ORM\Entity(repositoryClass=”\Customize\Repository\HogeRepository”)の部分。
\Customize\Repository\HogeRepositoryではなく、Customize\Repository\HogeRepositoryと書かないとダメだった。
下のように書くとエラーになる。
/**
* @ORM\Table(name="dtb_hoge")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="\Customize\Repository\HogeRepository")
*/
class Hoge extends \Eccube\Entity\AbstractEntity
EC-CUBEに関するお問い合わせ
[重要]現在公式にセキュリティサポートが切れていないPHPは8.1以上、MySQLは8.0以上で、対応しているEC-CUBEバージョンは4.2以上です。古いEC-CUBEを使っている方は適切なタイミングでバージョンアップをご検討ください。
EC-CUBEゴールドパートナー