LinuxCommandLibrary

symfony

Manage and develop Symfony applications

TLDR

Create a new Symfony project

$ symfony new [name]
copy

Run a local web server
$ symfony serve
copy

Stop the local web server
$ symfony server:stop
copy

Check for security issues in the project's dependencies
$ symfony security:check
copy

SYNOPSIS

symfony [global-options] <command> [command-options] [arguments]

Examples:
symfony new my_project --version=6.4
symfony serve -d
symfony help serve

PARAMETERS

-h, --help
    Display help for the given command. When no command is given, display help for the
list
command.

-q, --quiet
    Do not output any message.

-v|vv|vvv, --verbose
    Increase the verbosity of messages: 1 for normal output, 2 for more verbose output, and 3 for debug.

--version
    Display this application version.

-n, --no-interaction
    Do not ask any interactive question.

--env=
    The environment the command should run in (e.g.,
dev
,
prod
).

--no-ansi
    Disable ANSI output.

DESCRIPTION

The symfony command-line tool, often referred to as Symfony CLI, is the official, global tool for developing and managing Symfony applications. It provides a local web server with HTTPS support, seamless integration with SymfonyCloud, and various utilities to enhance developer productivity. Unlike the project-specific
bin/console
command, which handles framework-level tasks (like database migrations or cache clearing), the symfony CLI is a standalone binary. It's designed to streamline common development tasks such as creating new projects (
symfony new
), serving local sites securely (
symfony serve
), managing environments, and deploying applications directly to SymfonyCloud. Its primary goal is to offer a secure, high-performance local development environment and simplify the entire Symfony application lifecycle, from setup to deployment.

CAVEATS

The symfony command requires PHP and Composer to be installed and properly configured on your system. It is not a standard Linux distribution package and is typically installed via Composer or direct download. Its full functionality is realized when used within the context of a Symfony project.

HISTORY

The symfony CLI was introduced to offer a more integrated and user-friendly experience for Symfony developers, complementing the existing project-specific
bin/console
command. It was developed to address common pain points such as setting up a local web server with automatic HTTPS, simplifying project creation, and providing seamless integration with SymfonyCloud for deployment. Its evolution has been driven by the Symfony core team, adding features like first-class support for SymfonyCloud, local TLS certificate management, and various developer utilities, making it a central and indispensable tool in the Symfony ecosystem since its initial release around 2018.

SEE ALSO

php(1), composer(1), git(1), docker(1)

Copied to clipboard