glavweb/symfony-rest

The "Symfony Edition" distribution for REST API


README

Welcome to the Symfony REST Edition - a fully-functional Symfony application that you can use as the skeleton for your new applications.

For details on how to download and get started with Symfony, see the Installation chapter of the Symfony Documentation.

  1. Installing the REST Edition

When it comes to installing the Symfony REST Edition, you have the following options.

Get the application using composer

As Symfony uses Composer to manage its dependencies, the recommended way to create a new project is to use it.

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:

curl -s http://getcomposer.org/installer | php

Then, use the create-project command to generate a new Symfony application:

php composer.phar create-project glavweb/symfony-rest path/to/application

Composer will install Symfony and all its dependencies under the path/to/application directory.

Execute migrations:

php bin/console d:m:m -n

Execute fixtures:

php bin/console h:d:f:l -n
  1. Checking your System Configuration

Before starting coding, make sure that your local system is properly configured for Symfony.

Execute the check.php script from the command line:

php app/check.php

Access the config.php script from a browser:

http://localhost/path/to/application/app/web/config.php

If you get any warnings or recommendations, fix them before moving on.

  1. Browsing the Demo Application

Congratulations! You're now ready to use Symfony.

From the config.php page, click the "Bypass configuration and go to the Welcome page" link to load up your first Symfony page.

You can also use a web-based configurator by clicking on the "Configure your Symfony Application online" link of the config.php page.

To see a admin dashboard, access the following page:

http://localhost/path/to/application/admin

User access:

login: admin
password: weloveglavweb

To see a API documentation, access the following page:

http://localhost/path/to/application/api/doc

Where you can test your API.

What's inside?

The Symfony Standard Edition is configured with the following defaults:

  • An AppBundle you can use to start coding;

  • Twig as the only configured template engine;

  • Doctrine ORM/DBAL;

  • Swiftmailer;

  • Annotations enabled for everything.

It comes pre-configured with the following bundles:

  • FrameworkBundle - The core Symfony framework bundle

  • SensioFrameworkExtraBundle - Adds several enhancements, including template and routing annotation capability

  • DoctrineBundle - Adds support for the Doctrine ORM

  • TwigBundle - Adds support for the Twig templating engine

  • SecurityBundle - Adds security by integrating Symfony's security component

  • SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails

  • MonologBundle - Adds support for Monolog, a logging library

  • WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar

  • SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions

  • SensioGeneratorBundle (in dev/test env) - Adds code generation capabilities

  • DebugBundle (in dev/test env) - Adds Debug and VarDumper component integration

  • FOSRestBundle - Adds rest functionality

  • NelmioApiDocBundle - Add API documentation features

All libraries and bundles included in the Symfony Standard Edition are released under the MIT or BSD license.

Enjoy!