symfony 4事件监听器未调用

时间:2018-11-20 15:26:26

标签: symfony symfony4 oneupuploaderbundle

我在services.yaml中有以下代码

App\EventListener\:
    resource: '../src/EventListener/UploadListener.php'
    arguments: ['@doctrine.orm.entity_manager']
    tags: 
        - { name: 'kernel.event_listener', event: 'oneup_uploader.post_persist', method: 'onUpload'}

但是当我运行命令

php bin/console debug:event-dispatcher oneup_uploader.post_persist

它给了我这个警告

[WARNING] The event "oneup_uploader.post_persist" does not have any registered listeners.

0 个答案:

没有答案