bshaffer / oauth2-server-bundle

OAuth2 for your Symfony Application
MIT License
106 stars 72 forks source link

There are no commands defined in the "OAuth2" namespace. #70

Open balvirsingh opened 4 years ago

balvirsingh commented 4 years ago

symfony 4.4.8 php 7.3

When I run the command - php bin/console OAuth2:CreateScope scope read

it gives the following error - There are no commands defined in the "OAuth2" namespace.

myspulin commented 4 years ago

You have to register all commands as service:

services:

OAuth2\ServerBundle\Command\CreateClientCommand:
    tags:
    - { name: 'console.command', command: 'OAuth2:CreateClient' }

OAuth2\ServerBundle\Command\CreateScopeCommand:
    tags:
    - { name: 'console.command', command: 'OAuth2:CreateScope' }

OAuth2\ServerBundle\Command\CreateUserCommand:
    tags:
    - { name: 'console.command', command: 'OAuth2:CreateUser' }