How to run command from bundle in app controller in Symfony3?

后端 未结 1 1371
既然无缘
既然无缘 2020-12-21 05:31

INTRODUCTION

In my personal project I am using:

  1. Symfony v3.2.7
  2. PHP v7.1.1
  3. CravlerMaxMindGeoIpBundle
  4. How to Call a Command
相关标签:
1条回答
  • 2020-12-21 06:02

    It is a common mistake to import:

    use Symfony\Component\Console\Application;
    

    instead of:

    use Symfony\Bundle\FrameworkBundle\Console\Application;
    

    So make sure to import the second class (from FrameworkBundle) to load all configured commands (external or not) correctly.

    0 讨论(0)
提交回复
热议问题