### Handle Existing Installations
Source: https://symfony.com/bundles/FOSCKEditorBundle/current/usage/ckeditor.html
Define how the installer should behave when a previous installation is detected.
```bash
$ php bin/console ckeditor:install --clear=drop
$ php bin/console ckeditor:install --clear=keep
$ php bin/console ckeditor:install --clear=skip
```
--------------------------------
### Clear Cache and Install Assets
Source: https://symfony.com/bundles/SonataAdminBundle/current/getting_started/installation.html
Prepare the environment after installation by clearing the cache and installing assets.
```bash
bin/console cache:clear
bin/console assets:install
```
--------------------------------
### Install SassBundle
Source: https://symfony.com/bundles/SassBundle/current/index.html
Install the bundle using Composer.
```bash
$ composer require symfonycasts/sass-bundle
```
--------------------------------
### Install UX Live Component Bundle
Source: https://symfony.com/bundles/ux-live-component/current/index.html
Install the bundle via Composer.
```bash
$ composer require symfony/ux-live-component
```
--------------------------------
### Install OneupFlysystemBundle
Source: https://symfony.com/bundles/LiipImagineBundle/current/cache-resolver/flysystem.html
Command to install the OneupFlysystemBundle via Composer.
```bash
$ composer require oneup/flysystem-bundle
```
--------------------------------
### Install Web-Token Bundle
Source: https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/10-web-token.html
Required dependency installation for enabling Web-Token support.
```bash
1
```
```bash
composer require web-token/jwt-bundle
```
--------------------------------
### Install and Initialize TailwindBundle
Source: https://symfony.com/bundles/TailwindBundle/current/index.html
Commands to install the bundle via Composer and initialize the application configuration.
```bash
$ composer require symfonycasts/tailwind-bundle
$ php bin/console tailwind:init
```
--------------------------------
### Rendered output examples
Source: https://symfony.com/bundles/EasyAdminBundle/current/fields/AvatarField.html
Examples of how the field is rendered in different contexts.
```text
1
```
```html
```
--------------------------------
### Install Symfony UX Svelte
Source: https://symfony.com/bundles/ux-svelte/current/index.html
Commands to install the bundle and initialize assets.
```bash
$ composer require symfony/ux-svelte
$ npm install --force
$ npm run watch
```
--------------------------------
### Complete Controller Example
Source: https://symfony.com/bundles/NelmioApiDocBundle/current/symfony_attributes.html
A comprehensive example demonstrating MapQueryString, MapQueryParameter, MapRequestPayload, and MapUploadedFile with corresponding OA attributes.
```php
namespace AppBundle\Controller;
use AppBundle\UserDTO;
use AppBundle\UserQuery;
use OpenApi\Attributes as OA;
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
use Symfony\Component\HttpKernel\Attribute\MapUploadedFile;
use Symfony\Component\Routing\Attribute\Route;
class UserController
{
/**
* Find user with MapQueryString.
*/
#[Route('/api/users', methods: ['GET'])]
#[OA\Parameter(
name: 'userId',
description: 'Id of the user to find',
in: 'query',
)]
public function findUser(#[MapQueryString] UserQuery $userQuery)
{
// ...
}
/**
* Find user with MapQueryParameter.
*/
#[Route('/api/users/v2', methods: ['GET'])]
#[OA\Parameter(
name: 'userId',
description: 'Id of the user to find',
in: 'query',
)]
public function findUserV2(#[MapQueryParameter] int $userId)
{
// ...
}
/**
* Create a new user.
*/
#[Route('/api/users', methods: ['POST'])]
#[OA\RequestBody(
groups: ['create'],
)]
public function createUser(#[MapRequestPayload] UserDTO $user)
{
// ...
}
/**
* Upload a profile picture
*/
#[Route('/api/users/picture', methods: ['POST'])]
#[OA\RequestBody(
description: 'Content of the profile picture upload request',
content: [
new OA\MediaType('multipart/form-data', new OA\Schema(
properties: [new OA\Property(
property: 'file',
description: 'File containing the profile picture',
)],
)),
],
)]
public function createUser(#[MapUploadedFile] UploadedFile $picture)
{
// ...
}
}
```
--------------------------------
### Install Backup Code Bundle
Source: https://symfony.com/bundles/SchebTwoFactorBundle/current/backup_codes.html
Install the required dependency via Composer.
```bash
composer require scheb/2fa-backup-code
```
--------------------------------
### Setup Admin ACL Rules
Source: https://symfony.com/bundles/SonataAdminBundle/current/reference/security.html
Install or update CRUD ACL rules for existing Admin classes.
```bash
bin/console sonata:admin:setup-acl
Starting ACL AdminBundle configuration
> install ACL for sonata.media.admin.media
- add role: ROLE_SONATA_MEDIA_ADMIN_MEDIA_GUEST, permissions: ["VIEW","LIST"]
- add role: ROLE_SONATA_MEDIA_ADMIN_MEDIA_STAFF, permissions: ["EDIT","LIST","CREATE"]
- add role: ROLE_SONATA_MEDIA_ADMIN_MEDIA_EDITOR, permissions: ["OPERATOR","EXPORT"]
- add role: ROLE_SONATA_MEDIA_ADMIN_MEDIA_ADMIN, permissions: ["MASTER"]
... skipped ...
```
--------------------------------
### Install assets manually
Source: https://symfony.com/bundles/NelmioApiDocBundle/current/faq.html
Execute this command to manually install bundle assets if automatic installation fails.
```bash
$ php bin/console assets:install --symlink
```
--------------------------------
### Install Vue loader for Webpack Encore
Source: https://symfony.com/bundles/ux-vue/current/index.html
Install the required vue-loader dependency and start the watch process.
```bash
$ npm install -D vue-loader --force
$ npm run watch
```
--------------------------------
### Warm Up Cache Output Example
Source: https://symfony.com/bundles/LiipImagineBundle/current/commands.html
Example output showing the resolved URLs for warmed up cache.
```text
http://localhost/media/cache/thumb1/path1
http://localhost/media/cache/thumb1/path2
```
--------------------------------
### Install Flysystem Bundle
Source: https://symfony.com/bundles/EasyAdminBundle/current/fields/FileField.html
Install the required Flysystem bundle via Composer.
```bash
$ composer require league/flysystem-bundle
```
--------------------------------
### Install Reprise Bundle
Source: https://symfony.com/bundles/reprise/current/index.html
Install the bundle via Composer and the npm package via npm.
```bash
$ composer require symfony/reprise
```
```bash
$ npm install @symfony/reprise --save-dev
```
--------------------------------
### Install NelmioApiDocBundle
Source: https://symfony.com/bundles/NelmioApiDocBundle/current/index.html
Execute this command in your project directory to download the bundle.
```bash
$ composer require nelmio/api-doc-bundle
```
--------------------------------
### Install SchebTwoFactorBundle via Composer
Source: https://symfony.com/bundles/SchebTwoFactorBundle/current/installation.html
Commands to install the bundle and optional feature packages.
```bash
composer require 2fa
```
```bash
composer require scheb/2fa-bundle
```
```bash
composer require scheb/2fa-backup-code # Add backup code feature
composer require scheb/2fa-trusted-device # Add trusted devices feature
composer require scheb/2fa-totp # Add two-factor authentication using TOTP
composer require scheb/2fa-google-authenticator # Add two-factor authentication with Google Authenticator
composer require scheb/2fa-email # Add two-factor authentication using email
```
--------------------------------
### Install Required Dependencies
Source: https://symfony.com/bundles/ux-live-component/current/index.html
Install necessary packages for reflection and property info extraction.
```bash
$ composer require phpdocumentor/reflection-docblock
```
```bash
$ composer require symfony/property-info:^7.1
```
--------------------------------
### Install Email Authentication Package
Source: https://symfony.com/bundles/SchebTwoFactorBundle/current/providers/email.html
Install the required package to enable email-based two-factor authentication.
```bash
composer require scheb/2fa-email
```
--------------------------------
### Field Label Configuration Examples
Source: https://symfony.com/bundles/EasyAdminBundle/current/fields.html
Examples demonstrating how to define or omit labels for fields, including handling of null, false, and HTML content.
```php
// label not defined: generate it automatically (label = 'First Name') TextField::new('firstName'), // label is null: generate it automatically (label = 'First Name') TextField::new('firstName', null),
// label is false: no label is displayed and no