diff --git a/book/propel.rst b/book/propel.rst index 91b9c2fe144..3023c17da9c 100644 --- a/book/propel.rst +++ b/book/propel.rst @@ -55,10 +55,10 @@ configuration file (``config.yml``): propel: dbal: - driver: "%database_driver%" - user: "%database_user%" - password: "%database_password%" - dsn: "%database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%" + driver: "%database_driver%" + user: "%database_user%" + password: "%database_password%" + dsn: "%database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%" Now that Propel knows about your database, Symfony2 can create the database for you: diff --git a/book/security.rst b/book/security.rst index 18eb6c9ba1f..4268aa717bf 100644 --- a/book/security.rst +++ b/book/security.rst @@ -45,7 +45,7 @@ authentication (i.e. the old-school username/password box): security: firewalls: secured_area: - pattern: ^/ + pattern: ^/ anonymous: ~ http_basic: realm: "Secured Demo Area" @@ -300,11 +300,11 @@ First, enable form login under your firewall: security: firewalls: secured_area: - pattern: ^/ + pattern: ^/ anonymous: ~ form_login: - login_path: login - check_path: login_check + login_path: login + check_path: login_check .. code-block:: xml @@ -373,10 +373,10 @@ submission (i.e. ``/login_check``): # app/config/routing.yml login: - path: /login - defaults: { _controller: AcmeSecurityBundle:Security:login } + path: /login + defaults: { _controller: AcmeSecurityBundle:Security:login } login_check: - path: /login_check + path: /login_check .. code-block:: xml @@ -637,8 +637,8 @@ see :doc:`/cookbook/security/form_login`. firewalls: login_firewall: - pattern: ^/login$ - anonymous: ~ + pattern: ^/login$ + anonymous: ~ secured_area: pattern: ^/ form_login: ~ @@ -1094,13 +1094,14 @@ aren't stored anywhere in a database. The actual user object is provided by Symfony (:class:`Symfony\\Component\\Security\\Core\\User\\User`). .. tip:: + Any user provider can load users directly from configuration by specifying the ``users`` configuration parameter and listing the users beneath it. .. caution:: If your username is completely numeric (e.g. ``77``) or contains a dash - (e.g. ``user-name``), you should use that alternative syntax when specifying + (e.g. ``user-name``), you should use an alternative syntax when specifying users in YAML: .. code-block:: yaml diff --git a/book/translation.rst b/book/translation.rst index 73d771032b0..840fab3baea 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -452,8 +452,8 @@ by the routing system using the special ``_locale`` parameter: .. code-block:: yaml contact: - path: /{_locale}/contact - defaults: { _controller: AcmeDemoBundle:Contact:index, _locale: en } + path: /{_locale}/contact + defaults: { _controller: AcmeDemoBundle:Contact:index, _locale: en } requirements: _locale: en|fr|de diff --git a/components/config/definition.rst b/components/config/definition.rst index 78961575c19..e6efe109eb9 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -21,14 +21,14 @@ applied to it (like: "the value for ``auto_connect`` must be a boolean value"): default_connection: mysql connections: mysql: - host: localhost - driver: mysql + host: localhost + driver: mysql username: user password: pass sqlite: - host: localhost - driver: sqlite - memory: true + host: localhost + driver: sqlite + memory: true username: user password: pass @@ -473,9 +473,9 @@ in this config: .. code-block:: yaml connection: - name: my_mysql_connection - host: localhost - driver: mysql + name: my_mysql_connection + host: localhost + driver: mysql username: user password: pass diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 16de8c3ece2..4265fae224c 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -134,8 +134,8 @@ making the class of a service a parameter: services: mailer: - class: '%mailer.class%' - arguments: ['%mailer.transport%'] + class: "%mailer.class%" + arguments: ["%mailer.transport%"] .. code-block:: xml diff --git a/components/dependency_injection/parentservices.rst b/components/dependency_injection/parentservices.rst index eed7419d6a3..00545e52b99 100644 --- a/components/dependency_injection/parentservices.rst +++ b/components/dependency_injection/parentservices.rst @@ -62,7 +62,7 @@ The service config for these classes would look something like this: my_email_formatter: # ... newsletter_manager: - class: "%newsletter_manager.class%" + class: "%newsletter_manager.class%" calls: - [setMailer, ["@my_mailer"]] - [setEmailFormatter, ["@my_email_formatter"]] @@ -196,7 +196,7 @@ a parent for a service. - [setEmailFormatter, ["@my_email_formatter"]] newsletter_manager: - class: "%newsletter_manager.class%" + class: "%newsletter_manager.class%" parent: mail_manager greeting_card_manager: @@ -321,13 +321,13 @@ to the ``NewsletterManager`` class, the config would look like this: - [setEmailFormatter, ["@my_email_formatter"]] newsletter_manager: - class: "%newsletter_manager.class%" + class: "%newsletter_manager.class%" parent: mail_manager calls: - [setMailer, ["@my_alternative_mailer"]] greeting_card_manager: - class: "%greeting_card_manager.class%" + class: "%greeting_card_manager.class%" parent: mail_manager .. code-block:: xml diff --git a/components/dependency_injection/types.rst b/components/dependency_injection/types.rst index c7a2995683c..5efc223c766 100644 --- a/components/dependency_injection/types.rst +++ b/components/dependency_injection/types.rst @@ -184,7 +184,7 @@ Another possibility is just setting public fields of the class directly:: my_mailer: # ... newsletter_manager: - class: NewsletterManager + class: NewsletterManager properties: mailer: "@my_mailer" diff --git a/cookbook/assetic/apply_to_option.rst b/cookbook/assetic/apply_to_option.rst index 4d2691620af..d8e782116b3 100644 --- a/cookbook/assetic/apply_to_option.rst +++ b/cookbook/assetic/apply_to_option.rst @@ -20,9 +20,9 @@ An example configuration might look like this: assetic: filters: coffee: - bin: /usr/bin/coffee - node: /usr/bin/node - node_paths: [ /usr/lib/node_modules/ ] + bin: /usr/bin/coffee + node: /usr/bin/node + node_paths: [/usr/lib/node_modules/] .. code-block:: xml @@ -130,10 +130,10 @@ applied to all ``.coffee`` files: assetic: filters: coffee: - bin: /usr/bin/coffee - node: /usr/bin/node - node_paths: [ /usr/lib/node_modules/ ] - apply_to: "\.coffee$" + bin: /usr/bin/coffee + node: /usr/bin/node + node_paths: [/usr/lib/node_modules/] + apply_to: "\.coffee$" .. code-block:: xml diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 73bcd89816c..19413842ca9 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -75,6 +75,7 @@ your JavaScripts: + @@ -86,6 +87,7 @@ your JavaScripts: $container->loadFromExtension('assetic', array( 'filters' => array( 'uglifyjs2' => array( + // the path to the uglifyjs executable 'bin' => '/usr/local/bin/uglifyjs', ), ), diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index 4a225d34f9f..22188f7e597 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -53,7 +53,7 @@ in the core FrameworkBundle: # app/config/config.yml parameters: - translator.class: Acme\HelloBundle\Translation\Translator + translator.class: Acme\HelloBundle\Translation\Translator .. code-block:: xml diff --git a/cookbook/bundles/prepend_extension.rst b/cookbook/bundles/prepend_extension.rst index 61e0d642cd0..5ae75f23f6b 100644 --- a/cookbook/bundles/prepend_extension.rst +++ b/cookbook/bundles/prepend_extension.rst @@ -99,7 +99,6 @@ for ``acme_hello`` is set to ``non_default``: .. code-block:: yaml # app/config/config.yml - acme_something: # ... use_acme_goodbye: false @@ -112,7 +111,6 @@ for ``acme_hello`` is set to ``non_default``: .. code-block:: xml - non_default @@ -122,7 +120,6 @@ for ``acme_hello`` is set to ``non_default``: .. code-block:: php // app/config/config.php - $container->loadFromExtension('acme_something', array( ..., 'use_acme_goodbye' => false, diff --git a/cookbook/configuration/apache_router.rst b/cookbook/configuration/apache_router.rst index c740979534a..af013694929 100644 --- a/cookbook/configuration/apache_router.rst +++ b/cookbook/configuration/apache_router.rst @@ -60,7 +60,7 @@ To test that it's working, let's create a very basic route for the AcmeDemoBundl # app/config/routing.yml hello: - path: /hello/{name} + path: /hello/{name} defaults: { _controller: AcmeDemoBundle:Demo:hello } .. code-block:: xml diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 1ea6f578ccd..27d679b2d82 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -64,6 +64,7 @@ easily and transparently: imports: - { resource: config.yml } + # ... .. code-block:: xml @@ -71,11 +72,13 @@ easily and transparently: + .. code-block:: php $loader->import('config.php'); + // ... To share common configuration, each environment's configuration file @@ -188,12 +191,12 @@ environment by using this code and changing the environment string. doctrine: dbal: - logging: "%kernel.debug%" + logging: "%kernel.debug%" # ... .. code-block:: xml - + .. code-block:: php diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index 7e811d205f7..20e3bc5277e 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -29,7 +29,7 @@ configuration format of your choice): framework: session: # ... - handler_id: session.handler.pdo + handler_id: session.handler.pdo parameters: pdo.db_options: diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index c8c2d611b3e..dbcb9689b99 100644 --- a/cookbook/controller/service.rst +++ b/cookbook/controller/service.rst @@ -60,7 +60,7 @@ Then you can define it as a service as follows: services: acme.hello.controller: - class: "%acme.controller.hello.class%" + class: "%acme.controller.hello.class%" .. code-block:: xml @@ -112,8 +112,8 @@ the route ``_controller`` value: # app/config/routing.yml hello: - path: /hello - defaults: { _controller: acme.hello.controller:indexAction } + path: /hello + defaults: { _controller: acme.hello.controller:indexAction } .. code-block:: xml diff --git a/cookbook/doctrine/dbal.rst b/cookbook/doctrine/dbal.rst index 2dbcb9d3823..f66b260dc47 100644 --- a/cookbook/doctrine/dbal.rst +++ b/cookbook/doctrine/dbal.rst @@ -92,7 +92,7 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document doctrine: dbal: types: - custom_first: Acme\HelloBundle\Type\CustomFirst + custom_first: Acme\HelloBundle\Type\CustomFirst custom_second: Acme\HelloBundle\Type\CustomSecond .. code-block:: xml @@ -143,7 +143,7 @@ mapping type: dbal: connections: default: - // Other connections parameters + # other connections parameters mapping_types: enum: string @@ -160,6 +160,7 @@ mapping type: + string @@ -173,6 +174,7 @@ mapping type: 'dbal' => array( 'connections' => array( 'default' => array( + // other connection parameers 'mapping_types' => array( 'enum' => 'string', ), diff --git a/cookbook/doctrine/multiple_entity_managers.rst b/cookbook/doctrine/multiple_entity_managers.rst index 780f5660711..40f54255ea9 100644 --- a/cookbook/doctrine/multiple_entity_managers.rst +++ b/cookbook/doctrine/multiple_entity_managers.rst @@ -24,7 +24,7 @@ The following configuration code shows how you can configure two entity managers doctrine: dbal: - default_connection: default + default_connection: default connections: default: driver: "%database_driver%" @@ -44,22 +44,21 @@ The following configuration code shows how you can configure two entity managers charset: UTF8 orm: - default_entity_manager: default + default_entity_manager: default entity_managers: default: - connection: default + connection: default mappings: - AcmeDemoBundle: ~ + AcmeDemoBundle: ~ AcmeStoreBundle: ~ customer: - connection: customer + connection: customer mappings: AcmeCustomerBundle: ~ .. code-block:: xml - - + .. code-block:: php diff --git a/cookbook/email/gmail.rst b/cookbook/email/gmail.rst index 11634282f0c..80e24412acb 100644 --- a/cookbook/email/gmail.rst +++ b/cookbook/email/gmail.rst @@ -59,7 +59,7 @@ You're done! # app/config/parameters.yml parameters: - ... + # ... mailer_transport: gmail mailer_host: ~ mailer_user: your_gmail_username diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index 81a22206237..45bec8c7901 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -407,9 +407,7 @@ it with :ref:`dic-tags-form-type`. class: Acme\DemoBundle\Form\Type\FriendMessageFormType arguments: ["@security.context"] tags: - - - name: form.type - alias: acme_friend_message + - { name: form.type, alias: acme_friend_message } .. code-block:: xml diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 6a80c068df7..6c354b741fb 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -447,11 +447,11 @@ form is rendered. .. code-block:: xml - - - AcmeDemoBundle:Form:fields.html.twig - - + + + AcmeDemoBundle:Form:fields.html.twig + + .. code-block:: php @@ -484,11 +484,11 @@ resource to use such a layout: .. code-block:: xml - - - form_table_layout.html.twig - - + + + form_table_layout.html.twig + + .. code-block:: php @@ -536,7 +536,7 @@ form is rendered. .. code-block:: xml - + AcmeDemoBundle:Form @@ -579,7 +579,7 @@ resource to use such a layout: .. code-block:: xml - + FrameworkBundle:FormTable diff --git a/cookbook/logging/channels_handlers.rst b/cookbook/logging/channels_handlers.rst index 566b8a9a338..6da06bbcdbd 100644 --- a/cookbook/logging/channels_handlers.rst +++ b/cookbook/logging/channels_handlers.rst @@ -30,7 +30,7 @@ To do so, just create a new handler and configure it like this: main: type: stream path: /var/log/symfony.log - channels: [!doctrine] + channels: ["!doctrine"] doctrine: type: stream path: /var/log/doctrine.log @@ -94,10 +94,10 @@ You can specify the configuration by many forms: channels: ~ # Include all the channels channels: foo # Include only channel "foo" - channels: !foo # Include all channels, except "foo" + channels: "!foo" # Include all channels, except "foo" channels: [foo, bar] # Include only channels "foo" and "bar" - channels: [!foo, !bar] # Include all channels, except "foo" and "bar" + channels: ["!foo", "!bar"] # Include all channels, except "foo" and "bar" Creating your own Channel ------------------------- diff --git a/cookbook/profiler/matchers.rst b/cookbook/profiler/matchers.rst index 85941701ad9..2857af88e3e 100644 --- a/cookbook/profiler/matchers.rst +++ b/cookbook/profiler/matchers.rst @@ -150,6 +150,7 @@ profiler to use this service as the matcher: + @@ -159,6 +160,7 @@ profiler to use this service as the matcher: // app/config/config.php $container->loadFromExtension('framework', array( + // ... 'profiler' => array( 'service' => 'acme_demo.profiler.matcher.super_admin', ), diff --git a/cookbook/request/mime_type.rst b/cookbook/request/mime_type.rst index 29ac6f484d9..fb57352c189 100644 --- a/cookbook/request/mime_type.rst +++ b/cookbook/request/mime_type.rst @@ -61,14 +61,17 @@ files and register it as a listener by adding the ``kernel.event_listener`` tag: - - - - + + + diff --git a/cookbook/routing/redirect_trailing_slash.rst b/cookbook/routing/redirect_trailing_slash.rst index 1682ef183f8..55d4138d4c1 100644 --- a/cookbook/routing/redirect_trailing_slash.rst +++ b/cookbook/routing/redirect_trailing_slash.rst @@ -46,7 +46,6 @@ system, as explained below: url: .*/$ _method: GET - .. code-block:: xml diff --git a/cookbook/routing/slash_in_parameter.rst b/cookbook/routing/slash_in_parameter.rst index 9b1b5f860ae..e5cdcbeafba 100644 --- a/cookbook/routing/slash_in_parameter.rst +++ b/cookbook/routing/slash_in_parameter.rst @@ -30,7 +30,7 @@ a more permissive regex path. path: /hello/{name} defaults: { _controller: AcmeDemoBundle:Demo:hello } requirements: - name: ".+" + name: .+ .. code-block:: xml diff --git a/cookbook/security/custom_authentication_provider.rst b/cookbook/security/custom_authentication_provider.rst index ba3a6638215..42e3dbd3de4 100644 --- a/cookbook/security/custom_authentication_provider.rst +++ b/cookbook/security/custom_authentication_provider.rst @@ -388,11 +388,11 @@ to service ids that do not exist yet: ``wsse.security.authentication.provider`` # src/Acme/DemoBundle/Resources/config/services.yml services: wsse.security.authentication.provider: - class: Acme\DemoBundle\Security\Authentication\Provider\WsseProvider + class: Acme\DemoBundle\Security\Authentication\Provider\WsseProvider arguments: ["", "%kernel.cache_dir%/security/nonces"] wsse.security.authentication.listener: - class: Acme\DemoBundle\Security\Firewall\WsseListener + class: Acme\DemoBundle\Security\Firewall\WsseListener arguments: ["@security.context", "@security.authentication.manager"] .. code-block:: xml diff --git a/cookbook/security/force_https.rst b/cookbook/security/force_https.rst index d3a3ae409cf..5887e8a8c44 100644 --- a/cookbook/security/force_https.rst +++ b/cookbook/security/force_https.rst @@ -14,9 +14,7 @@ to use HTTPS then you could use the following configuration: .. code-block:: yaml access_control: - - path: ^/secure - roles: ROLE_ADMIN - requires_channel: https + - { path: ^/secure, roles: ROLE_ADMIN, requires_channel: https } .. code-block:: xml @@ -44,9 +42,7 @@ role: .. code-block:: yaml access_control: - - path: ^/login - roles: IS_AUTHENTICATED_ANONYMOUSLY - requires_channel: https + - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } .. code-block:: xml diff --git a/cookbook/security/securing_services.rst b/cookbook/security/securing_services.rst index 6b429c1735f..cbec97fb4d8 100644 --- a/cookbook/security/securing_services.rst +++ b/cookbook/security/securing_services.rst @@ -158,8 +158,8 @@ the :ref:`sidebar ` below): .. code-block:: yaml # src/Acme/HelloBundle/Resources/config/services.yml - # ... + # ... services: newsletter_manager: # ... @@ -243,16 +243,15 @@ documentation. .. code-block:: xml + - - - - + + @@ -261,7 +260,6 @@ documentation. // app/config/config.php $container->loadFromExtension('jms_security_extra', array( // ... - 'secure_all_services' => true, )); diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 2ab50f5d639..b66606eee1f 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -127,9 +127,9 @@ and tag it as a ``security.voter``: # src/Acme/AcmeBundle/Resources/config/services.yml services: security.access.blacklist_voter: - class: Acme\DemoBundle\Security\Authorization\Voter\ClientIpVoter - arguments: ["@service_container", [123.123.123.123, 171.171.171.171]] - public: false + class: Acme\DemoBundle\Security\Authorization\Voter\ClientIpVoter + arguments: ["@service_container", [123.123.123.123, 171.171.171.171]] + public: false tags: - { name: security.voter } diff --git a/cookbook/serializer.rst b/cookbook/serializer.rst index edc3cdaa509..e85631f74e2 100644 --- a/cookbook/serializer.rst +++ b/cookbook/serializer.rst @@ -37,7 +37,7 @@ it in your configuration: .. code-block:: xml - + diff --git a/cookbook/service_container/scopes.rst b/cookbook/service_container/scopes.rst index 1780195e3c0..1926ea0cf08 100644 --- a/cookbook/service_container/scopes.rst +++ b/cookbook/service_container/scopes.rst @@ -149,7 +149,7 @@ your code. This should also be taken into account when declaring your service: greeting_card_manager: class: Acme\HelloBundle\Mail\GreetingCardManager calls: - - [setRequest, ['@?request=']] + - [setRequest, ["@?request="]] .. code-block:: xml @@ -304,6 +304,7 @@ The service config for this class would look something like this: parameters: # ... my_mailer.class: Acme\HelloBundle\Mail\Mailer + services: my_mailer: class: "%my_mailer.class%" diff --git a/cookbook/session/php_bridge.rst b/cookbook/session/php_bridge.rst index fefdd26e73f..bc6acc9bf6c 100644 --- a/cookbook/session/php_bridge.rst +++ b/cookbook/session/php_bridge.rst @@ -14,24 +14,70 @@ use Symfony's session management by using the PHP Bridge session. If the application has sets it's own PHP save handler, you can specify null for the ``handler_id``: -.. code-block:: yaml +.. configuration-block:: - framework: - session: - storage_id: session.storage.php_bridge - handler_id: ~ + .. code-block:: yaml + + framework: + session: + storage_id: session.storage.php_bridge + handler_id: ~ + + .. code-block:: xml + + + + + + + + + + .. code-block:: php + + $container->loadFromExtension('framework', array( + 'session' => array( + 'storage_id' => 'session.storage.php_bridge', + 'handler_id' => null, + )); Otherwise, if the problem is simply that you cannot avoid the application starting the session with ``session_start()``, you can still make use of a Symfony based session save handler by specifying the save handler as in the example below: -.. code-block:: yaml +.. configuration-block:: + + .. code-block:: yaml + + framework: + session: + storage_id: session.storage.php_bridge + handler_id: session.handler.native_file + + .. code-block:: xml + + + + + + + + + + .. code-block:: php - framework: - session: - storage_id: session.storage.php_bridge - handler_id: session.handler.native_file + $container->loadFromExtension('framework', array( + 'session' => array( + 'storage_id' => 'session.storage.php_bridge', + 'handler_id' => 'session.storage.native_file', + )); .. note:: diff --git a/cookbook/session/sessions_directory.rst b/cookbook/session/sessions_directory.rst index 974764df923..e1120165453 100644 --- a/cookbook/session/sessions_directory.rst +++ b/cookbook/session/sessions_directory.rst @@ -16,7 +16,7 @@ to store session data. This is because of the following configuration: framework: session: # handler_id set to null will use default session handler from php.ini - handler_id: ~ + handler_id: ~ .. code-block:: xml @@ -31,7 +31,7 @@ to store session data. This is because of the following configuration: http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" > - + @@ -42,7 +42,7 @@ to store session data. This is because of the following configuration: $container->loadFromExtension('framework', array( 'session' => array( // handler_id set to null will use default session handler from php.ini - 'handler-id' => null, + 'handler_id' => null, ), )); @@ -123,8 +123,9 @@ session directory to ``app/sessions``: http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" > - - + @@ -133,8 +134,8 @@ session directory to ``app/sessions``: // app/config/config.php $container->loadFromExtension('framework', array( 'session' => array( - 'handler-id' => 'session.handler.native_file', - 'save-path' => '%kernel.root_dir%/sessions', + 'handler_id' => 'session.handler.native_file', + 'save_path' => '%kernel.root_dir%/sessions', ), )); diff --git a/cookbook/symfony1.rst b/cookbook/symfony1.rst index 5db7fb7d9db..fed6c7ea25a 100644 --- a/cookbook/symfony1.rst +++ b/cookbook/symfony1.rst @@ -168,7 +168,7 @@ AcmeDemoBundle is not defined in your ``composer.json`` file. Nonetheless are the files autoloaded. This is because you can tell composer to autoload files from specific directories without defining a dependency: -.. code-block:: yaml +.. code-block:: json "autoload": { "psr-0": { "": "src/" } diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index bd3dba7ff26..84e7c4fe6d4 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -22,14 +22,15 @@ your application configuration file: # app/config/config.yml framework: # ... - templating: { engines: ['twig', 'php'] } + templating: + engines: ['twig', 'php'] .. code-block:: xml - + - + @@ -39,7 +40,6 @@ your application configuration file: $container->loadFromExtension('framework', array( // ... - 'templating' => array( 'engines' => array('twig', 'php'), ), @@ -290,7 +290,7 @@ pattern: # src/Acme/HelloBundle/Resources/config/routing.yml hello: # The route name - path: /hello/{name} + path: /hello/{name} defaults: { _controller: AcmeHelloBundle:Hello:index } Using Assets: images, JavaScripts, and stylesheets diff --git a/cookbook/templating/render_without_controller.rst b/cookbook/templating/render_without_controller.rst index f2a44f7e4e1..c718dfdea5e 100644 --- a/cookbook/templating/render_without_controller.rst +++ b/cookbook/templating/render_without_controller.rst @@ -22,7 +22,7 @@ can do this without creating a controller: path: /privacy defaults: _controller: FrameworkBundle:Template:template - template: 'AcmeBundle:Static:privacy.html.twig' + template: 'AcmeBundle:Static:privacy.html.twig' .. code-block:: xml @@ -92,9 +92,9 @@ other variables in your route, you can control exactly how your page is cached: acme_privacy: path: /privacy defaults: - _controller: FrameworkBundle:Template:template - template: 'AcmeBundle:Static:privacy.html.twig' - maxAge: 86400 + _controller: FrameworkBundle:Template:template + template: 'AcmeBundle:Static:privacy.html.twig' + maxAge: 86400 sharedMaxAge: 86400 .. code-block:: xml @@ -134,4 +134,4 @@ object created in the controller. For more information on caching, see There is also a ``private`` variable (not shown here). By default, the Response will be made public, as long as ``maxAge`` or ``sharedMaxAge`` are passed. -If set to ``true``, the Response will be marked as private. \ No newline at end of file +If set to ``true``, the Response will be marked as private. diff --git a/cookbook/testing/database.rst b/cookbook/testing/database.rst index ab869fa3a62..da3467abc3c 100644 --- a/cookbook/testing/database.rst +++ b/cookbook/testing/database.rst @@ -118,9 +118,9 @@ configuration: doctrine: # ... dbal: - host: localhost - dbname: testdb - user: testdb + host: localhost + dbname: testdb + user: testdb password: testdb .. code-block:: xml