Skip to content

Fixed code example (2) #1597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jul 29, 2012
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a94e79e
Fixed bash code examples in book/controller
wouterj Jul 15, 2012
d4500c5
Fixed bash code examples in book/doctrine
wouterj Jul 15, 2012
273354a
Fixed bash code examples in book/forms
wouterj Jul 15, 2012
5e0e524
Fixed bash code examples in book/installation
wouterj Jul 15, 2012
2394978
Fixed bash code examples in book/page_creation
wouterj Jul 15, 2012
25be3ee
Fixed bash code examples in book/propel
wouterj Jul 15, 2012
fa5980d
Fixed bash code examples in book/routing
wouterj Jul 15, 2012
defa5c7
Fixed bash code examples in book/translation
wouterj Jul 15, 2012
d7f1d49
Fixed bash code examples in components/console
wouterj Jul 15, 2012
7c541f2
Fixed bash code examples in cookbook/assetic
wouterj Jul 15, 2012
fe2010c
Fixed bash code examples in cookbook/configuration
wouterj Jul 15, 2012
3b03e1c
Fixed bash code examples in cookbook/console
wouterj Jul 15, 2012
5478dbe
Fixed bash code examples in cookbook/doctrine
wouterj Jul 15, 2012
6f2bdf9
Fixed bash code examples in cookbook/email
wouterj Jul 15, 2012
c036990
Fixed bash code examples in quick_tour
wouterj Jul 15, 2012
0b3618e
Fixed filecomment in book/propel
wouterj Jul 15, 2012
6c8f3d2
Fixed bash code examples in book/propel
wouterj Jul 15, 2012
4bba742
Added standards to contributing/documentation
wouterj Jul 15, 2012
304b00c
Fixed rst format
wouterj Jul 16, 2012
4c69bcf
Fixed some grammar
wouterj Jul 17, 2012
cd91d9e
Fixed max line length
wouterj Jul 25, 2012
e612d04
Revert "Fixed max line length"
wouterj Jul 26, 2012
e493a4e
Fixed format
wouterj Jul 26, 2012
135ff8d
Final format tweak
wouterj Jul 26, 2012
329b361
Changed absolute link to relative doc link
wouterj Jul 26, 2012
0d7f858
Fixed error in doc link
wouterj Jul 26, 2012
4eac3ed
Fixed to long lines
wouterj Jul 26, 2012
056873e
Removed not used link
wouterj Jul 26, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ command:

.. code-block:: bash

php app/console container:debug
$ php app/console container:debug

For more information, see the :doc:`/book/service_container` chapter.

Expand Down
28 changes: 14 additions & 14 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ persist it to the database and fetch it back out.

.. code-block:: bash

php app/console generate:bundle --namespace=Acme/StoreBundle
$ php app/console generate:bundle --namespace=Acme/StoreBundle

Configuring the Database
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -84,7 +84,7 @@ for you:

.. code-block:: bash

php app/console doctrine:database:create
$ php app/console doctrine:database:create

Creating an Entity Class
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -118,7 +118,7 @@ just a simple PHP class.

.. code-block:: bash

php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Product" --fields="name:string(255) price:float description:text"
$ php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Product" --fields="name:string(255) price:float description:text"

.. index::
single: Doctrine; Adding mapping metadata
Expand Down Expand Up @@ -279,7 +279,7 @@ a regular PHP class, you need to create getter and setter methods (e.g. ``getNam

.. code-block:: bash

php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product
$ php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product

This command makes sure that all of the getters and setters are generated
for the ``Product`` class. This is a safe command - you can run it over and
Expand Down Expand Up @@ -313,8 +313,8 @@ mapping information) of a bundle or an entire namespace:

.. code-block:: bash

php app/console doctrine:generate:entities AcmeStoreBundle
php app/console doctrine:generate:entities Acme
$ php app/console doctrine:generate:entities AcmeStoreBundle
$ php app/console doctrine:generate:entities Acme

.. note::

Expand All @@ -334,7 +334,7 @@ in your application. To do this, run:

.. code-block:: bash

php app/console doctrine:schema:update --force
$ php app/console doctrine:schema:update --force

.. tip::

Expand Down Expand Up @@ -727,7 +727,7 @@ used earlier to generate the missing getter and setter methods:

.. code-block:: bash

php app/console doctrine:generate:entities Acme
$ php app/console doctrine:generate:entities Acme

Next, add a new method - ``findAllOrderedByName()`` - to the newly generated
repository class. This method will query for all of the ``Product`` entities,
Expand Down Expand Up @@ -779,7 +779,7 @@ you can let Doctrine create the class for you.

.. code-block:: bash

php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Category" --fields="name:string(255)"
$ php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Category" --fields="name:string(255)"

This task generates the ``Category`` entity for you, with an ``id`` field,
a ``name`` field and the associated getter and setter functions.
Expand Down Expand Up @@ -890,7 +890,7 @@ methods for you:

.. code-block:: bash

php app/console doctrine:generate:entities Acme
$ php app/console doctrine:generate:entities Acme

Ignore the Doctrine metadata for a moment. You now have two classes - ``Category``
and ``Product`` with a natural one-to-many relationship. The ``Category``
Expand Down Expand Up @@ -919,7 +919,7 @@ table, and ``product.category_id`` column, and new foreign key:

.. code-block:: bash

php app/console doctrine:schema:update --force
$ php app/console doctrine:schema:update --force

.. note::

Expand Down Expand Up @@ -1322,7 +1322,7 @@ without any arguments:

.. code-block:: bash

php app/console
$ php app/console

A list of available command will print out, many of which start with the
``doctrine:`` prefix. You can find out more information about any of these
Expand All @@ -1331,7 +1331,7 @@ to get details about the ``doctrine:database:create`` task, run:

.. code-block:: bash

php app/console help doctrine:database:create
$ php app/console help doctrine:database:create

Some notable or interesting tasks include:

Expand All @@ -1341,7 +1341,7 @@ Some notable or interesting tasks include:

.. code-block:: bash

php app/console doctrine:ensure-production-settings --env=prod
$ php app/console doctrine:ensure-production-settings --env=prod

* ``doctrine:mapping:import`` - allows Doctrine to introspect an existing
database and create mapping information. For more information, see
Expand Down
2 changes: 1 addition & 1 deletion book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ going to need to build a form. But before you begin, first focus on the generic

.. code-block:: bash

php app/console generate:bundle --namespace=Acme/TaskBundle
$ php app/console generate:bundle --namespace=Acme/TaskBundle

This class is a "plain-old-PHP-object" because, so far, it has nothing
to do with Symfony or any other library. It's quite simply a normal PHP object
Expand Down
18 changes: 9 additions & 9 deletions book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ one of the following commands (replacing ``###`` with your actual filename):
.. code-block:: bash

# for .tgz file
tar zxvf Symfony_Standard_Vendors_2.0.###.tgz
$ tar zxvf Symfony_Standard_Vendors_2.0.###.tgz

# for a .zip file
unzip Symfony_Standard_Vendors_2.0.###.zip
$ unzip Symfony_Standard_Vendors_2.0.###.zip

When you're finished, you should have a ``Symfony/`` directory that looks
something like this:
Expand Down Expand Up @@ -81,7 +81,7 @@ by running the following command from the command line:

.. code-block:: bash

php bin/vendors install
$ php bin/vendors install

This command downloads all of the necessary vendor libraries - including
Symfony itself - into the ``vendor/`` directory. For more information on
Expand Down Expand Up @@ -121,11 +121,11 @@ If there are any issues, correct them now before moving on.

.. code-block:: bash

rm -rf app/cache/*
rm -rf app/logs/*
$ rm -rf app/cache/*
$ rm -rf app/logs/*

sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

**2. Using Acl on a system that does not support chmod +a**

Expand All @@ -136,8 +136,8 @@ If there are any issues, correct them now before moving on.

.. code-block:: bash

sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs

Note that not all web servers run as the user ``www-data``. You have to
check which user the web server is being run as and put it in for ``www-data``.
Expand Down
6 changes: 3 additions & 3 deletions book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ instructions (use all of the default options):

.. code-block:: bash

php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
$ php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml

Behind the scenes, a directory is created for the bundle at ``src/Acme/HelloBundle``.
A line is also automatically added to the ``app/AppKernel.php`` file so that
Expand Down Expand Up @@ -261,7 +261,7 @@ application should greet you:

.. code-block:: bash

php app/console cache:clear --env=prod --no-debug
$ php app/console cache:clear --env=prod --no-debug

An optional, but common, third step in the process is to create a template.

Expand Down Expand Up @@ -667,7 +667,7 @@ generating a basic bundle skeleton:

.. code-block:: bash

php app/console generate:bundle --namespace=Acme/TestBundle
$ php app/console generate:bundle --namespace=Acme/TestBundle

The bundle skeleton generates with a basic controller, template and routing
resource that can be customized. You'll learn more about Symfony2's command-line
Expand Down
20 changes: 9 additions & 11 deletions book/propel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ persist it to the database and fetch it back out.

.. code-block:: bash

php app/console generate:bundle --namespace=Acme/StoreBundle
$ php app/console generate:bundle --namespace=Acme/StoreBundle

Configuring the Database
~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -33,7 +33,7 @@ information. By convention, this information is usually configured in an

.. code-block:: ini

;app/config/parameters.ini
; app/config/parameters.ini
[parameters]
database_driver = mysql
database_host = localhost
Expand Down Expand Up @@ -62,7 +62,7 @@ you:

.. code-block:: bash

php app/console propel:database:create
$ php app/console propel:database:create

.. note::

Expand Down Expand Up @@ -104,7 +104,7 @@ After creating your ``schema.xml``, generate your model from it by running:

.. code-block:: bash

php app/console propel:model:build
$ php app/console propel:model:build

This generates each model class to quickly develop your application in the
``Model/`` directory the ``AcmeStoreBundle`` bundle.
Expand All @@ -119,9 +119,8 @@ needed for every known model in your application. To do this, run:

.. code-block:: bash

php app/console propel:sql:build

php app/console propel:sql:insert --force
$ php app/console propel:sql:build
$ php app/console propel:sql:insert --force

Your database now has a fully-functional ``product`` table with columns that
match the schema you've specified.
Expand Down Expand Up @@ -305,17 +304,16 @@ Create the classes:

.. code-block:: bash

php app/console propel:model:build
$ php app/console propel:model:build

Assuming you have products in your database, you don't want lose them. Thanks to
migrations, Propel will be able to update your database without losing existing
data.

.. code-block:: bash

php app/console propel:migration:generate-diff

php app/console propel:migration:migrate
$ php app/console propel:migration:generate-diff
$ php app/console propel:migration:migrate

Your database has been updated, you can continue to write your application.

Expand Down
4 changes: 2 additions & 2 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ the command by running the following from the root of your project.

.. code-block:: bash

php app/console router:debug
$ php app/console router:debug

The command will print a helpful list of *all* the configured routes in
your application:
Expand All @@ -1045,7 +1045,7 @@ the route name after the command:

.. code-block:: bash

php app/console router:debug article_show
$ php app/console router:debug article_show

.. index::
single: Routing; Generating URLs
Expand Down
2 changes: 1 addition & 1 deletion book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ filesystem and discovered by Symfony, thanks to some conventions.

.. code-block:: bash

php app/console cache:clear
$ php app/console cache:clear

.. index::
single: Translations; Translation resource locations
Expand Down
17 changes: 8 additions & 9 deletions components/console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Test the new console command by running the following

.. code-block:: bash

app/console demo:greet Fabien
$ app/console demo:greet Fabien

This will print the following to the command line:

Expand All @@ -93,7 +93,7 @@ You can also use the ``--yell`` option to make everything uppercase:

.. code-block:: bash

app/console demo:greet Fabien --yell
$ app/console demo:greet Fabien --yell

This prints::

Expand Down Expand Up @@ -153,8 +153,8 @@ The command can now be used in either of the following ways:

.. code-block:: bash

app/console demo:greet Fabien
app/console demo:greet Fabien Potencier
$ app/console demo:greet Fabien
$ app/console demo:greet Fabien Potencier

Using Command Options
---------------------
Expand Down Expand Up @@ -192,9 +192,8 @@ flag:

.. code-block:: bash

app/console demo:greet Fabien

app/console demo:greet Fabien --iterations=5
$ app/console demo:greet Fabien
$ app/console demo:greet Fabien --iterations=5

The first example will only print once, since ``iterations`` is empty and
defaults to ``1`` (the last argument of ``addOption``). The second example
Expand All @@ -205,8 +204,8 @@ will work:

.. code-block:: bash

app/console demo:greet Fabien --iterations=5 --yell
app/console demo:greet Fabien --yell --iterations=5
$ app/console demo:greet Fabien --iterations=5 --yell
$ app/console demo:greet Fabien --yell --iterations=5

There are 4 option variants you can use:

Expand Down
Loading