Getting started



Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

Configure your app

The ideal file will vary from project project, and you are free to customize yours as needed. A recommended baseline Symfony configuration is listed below, and can also be found in our Symfony template project.

# This file describes an application. You can have multiple applications
# in the same project.

# The name of this app. Must be unique within a project.
name: app

# The type of the application to build.
type: php:7.1
    flavor: composer

        # Tell Symfony to always install in production-mode.
        SYMFONY_ENV: 'prod'

# The hooks that will be performed when the package is deployed.
    build: |
        rm web/app_dev.php
        bin/console --env=prod assets:install --no-debug
    deploy: |
        bin/console --env=prod cache:clear

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `:`.
    database: "mysqldb:mysql"

# The size of the persistent disk of the application (in MB).
disk: 2048

# The mounts that will be performed when the package is deployed.
    "/var/cache": "shared:files/cache"
    "/var/logs": "shared:files/logs"
    "/var/sessions": "shared:files/sessions"

# The configuration of app when it is exposed to the web.
            # The public directory of the app, relative to its root.
            root: "web"
            # The front-controller script to send non-static requests to.
            passthru: "/app.php"