Skip to content

Symfony4, my_receiver is not supported error #86

@anthipapa

Description

@anthipapa

I tried using bernard-bundle in my Symfony 4.3 project to run a basic helloWorld background task, but when I try to run bernard: consume I get an error

In SimpleRouter.php line 38:
Given "my_receiver" is not supported. 

This is the services.yaml part

 my_receiver:
        class: App\BackgroundTasks\Receiver\
        tags:
            - { name: bernard.receiver, message: 'HelloWorld' }

It says the error is in SimpleRouter, so I tried debugging there using

var_dump($name);
var_dump($receiver);
var_dump(class_exists($receiver)); 

and I got

string(10) "HelloWorld"
string(11) "my_receiver"
bool(false)

Is this a bug because of Symfony? Or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions