From 35eaff6c47698a6c87c0e4292046f906de189385 Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Sat, 1 Nov 2014 22:57:26 +0200 Subject: [PATCH] Add missing autoload include And better explain where files should be placed in order to be auto-loaded. --- components/console/introduction.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index e28e9f9bc67..463ea4d19cc 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -18,6 +18,20 @@ Installation You can install the component in 2 different ways: * :doc:`Install it via Composer ` (``symfony/console`` on `Packagist`_); + +.. code-block:: json + + { + "require": { + "symfony/console": "2.5.*", + }, + "autoload": { + "psr-0": {"": "src/" } + } + + } + + * Use the official Git repository (https://github.com/symfony/Console). .. note:: @@ -35,6 +49,7 @@ Creating a basic Command To make a console command that greets you from the command line, create ``GreetCommand.php`` and add the following to it:: + // src/Acme/Console/Command/GreetCommand.php namespace Acme\Console\Command; use Symfony\Component\Console\Command\Command; @@ -87,6 +102,8 @@ an ``Application`` and adds commands to it:: #!/usr/bin/env php