KayueWordPressBundle with SYmfony 4.4.1: The class XXX was not found in the chain configured namespaces AppEntity

I’m trying to work with kayue/KayueWordpressBundle installed with composer as composer require kayue/kayue-wordpress-bundle in my Symfony 4.4.1 project but I’m unable to.

This is what I’m trying to do:

<?php

namespace AppServiceWordPress;

use DoctrineORMEntityManagerInterface;
use KayueWordpressBundleEntityPost;

class PostCollection
{
    protected $postRepository;

    public function __construct(EntityManagerInterface $entityManager)
    {
        $this->postRepository = $entityManager->getRepository(Post::class);
    }
}

The error I get:

The class 'KayueWordpressBundleEntityPost' was not found in the chain configured namespaces AppEntity

At first I blamed my dual-database configuration (Symfony is on a different DB from WordPress) but then I put the DBs together and the issue persists:

doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'

        # Only needed for MySQL (ignored otherwise)
        charset: utf8mb4
        default_table_options:
            collate: utf8mb4_unicode_ci
    orm:
        auto_generate_proxy_classes: true
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true
        mappings:
            App:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Entity'
                prefix: 'AppEntity'
                alias: App

I’ve been fiddling for the past 2hrs, but now I’m fresh out of ideas. I wonder if ANYONE actually got this to work with Symfony 4.

Thanks!

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *