РЕПЕТИТОР математика физика информатика
Для школьников и студентов. Подтягивание пробелов. ЦЭ, ЦТ, ОГЭ, ЕГЭ.
Идет набор на ЛЕТО. Жмите для подробностей:)
1186 of 1361 menu

Команда list

Команда list выводит список всех зарегистрированных команд консоли. Первым параметром можно передать название пространства имён, чтобы отфильтровать команды только из указанной группы. Вторым параметром передаётся формат вывода: txt, xml или json.

Синтаксис

php bin/console list [namespace] [--format=FORMAT]

Пример

Давайте выведем список всех доступных команд:

php bin/console list

Результат выполнения команды:

Symfony 7.0.0 (kernel: src, env: dev, debug: true) Usage: command [options] [arguments] Options: -h, --help Display help for the given command -q, --quiet Do not output any message -V, --version Display this application version --ansi|--no-ansi Force (or disable) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name [default: "dev"] --no-debug Switch off debug mode Available commands: about Display information about the current project cache:clear Clear the cache cache:warmup Warm up an empty cache debug:config Dump the current configuration help Display help for a command list List commands make make:controller Create a new controller class make:entity Create a new Doctrine entity class make:form Create a new form class make:command Create a new console command class router router:match Simulate a request and show matching route ...

Пример

Давайте отфильтруем команды только из пространства имён make:

php bin/console list make

Результат выполнения команды:

Symfony 7.0.0 (kernel: src, env: dev, debug: true) Available commands for the "make" namespace: make:controller Create a new controller class make:entity Create a new Doctrine entity class make:form Create a new form class make:command Create a new console command class make:migration Create a new migration class make:test Create a new test class make:user Create a new security user class make:voter Create a new security voter class ...

Пример

Давайте выведем список команд в формате json:

php bin/console list --format=json

Результат выполнения команды:

{ "application": { "name": "Symfony", "version": "7.0.0" }, "commands": [ { "name": "about", "description": "Display information about the current project" }, { "name": "cache:clear", "description": "Clear the cache" }, { "name": "cache:warmup", "description": "Warm up an empty cache" }, { "name": "help", "description": "Display help for a command" }, { "name": "list", "description": "List commands" } ] }

Смотрите также

  • команда help,
    которая выводит справку по команде
  • команда about,
    которая выводит информацию о проекте
  • команда debug:container,
    которая выводит список сервисов контейнера
  • команда debug:router,
    которая выводит список маршрутов приложения
Мы используем cookie для работы сайта, аналитики и персонализации. Обработка данных происходит согласно Политике конфиденциальности.
принять все настроить отклонить