Skip to content

Commit b55b984

Browse files
committed
Merge branch '2.0'
Conflicts: reference/configuration/web_profiler.rst
2 parents a16022c + 26875e7 commit b55b984

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+121
-133
lines changed

book/http_cache.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ which is actually a collection of various cache information.
290290
:ref:`http-expiration-validation` section.
291291

292292
.. index::
293-
single: Cache; Cache-Control Header
293+
single: Cache; Cache-Control header
294294
single: HTTP headers; Cache-Control
295295

296296
The Cache-Control Header
@@ -624,7 +624,7 @@ code.
624624
whether or not the resource has been updated since it was cached.
625625

626626
.. index::
627-
single: Cache; Conditional Get
627+
single: Cache; Conditional get
628628
single: HTTP; 304
629629

630630
.. _optimizing-cache-validation:

book/service_container.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. index::
22
single: Service Container
3-
single: Dependency Injection Container
3+
single: Dependency Injection; Container
44

55
Service Container
66
=================
@@ -62,7 +62,7 @@ classes is a well-known and trusted object-oriented best-practice. These skills
6262
are key to being a good developer in almost any language.
6363

6464
.. index::
65-
single: Service Container; What is?
65+
single: Service Container; What is a Service Container?
6666

6767
What is a Service Container?
6868
----------------------------
@@ -330,7 +330,7 @@ second method, which is the flexible and preferred method for importing service
330330
configuration from third-party bundles.
331331

332332
.. index::
333-
single: Service Container; imports
333+
single: Service Container; Imports
334334

335335
.. _service-container-imports-directive:
336336

book/stable_api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Stable API
3+
14
The Symfony2 Stable API
25
=======================
36

components/dependency_injection/compilation.rst

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
Compiling the Container
1+
.. index::
2+
single: Dependency Injection; Compilation
3+
4+
Compiling the Container
25
=======================
36

47
The service container can be compiled for various reasons. These reasons
@@ -121,14 +124,8 @@ worlds though by using configuration files and then dumping and caching the resu
121124
configuration. The ``PhpDumper`` makes dumping the compiled container easy::
122125

123126
use Symfony\Component\DependencyInjection\ContainerBuilder;
124-
use Symfony\Component\Config\FileLocator;
125-
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
126127
use Symfony\Component\DependencyInjection\Dumper\PhpDumper
127128

128-
$container = new ContainerBuilder();
129-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
130-
$loader->load('services.xml');
131-
132129
$file = __DIR__ .'/cache/container.php';
133130

134131
if (file_exists($file)) {

components/dependency_injection/introduction.rst

-78
Original file line numberDiff line numberDiff line change
@@ -279,81 +279,3 @@ The ``newsletter_manager`` and ``mailer`` services can be set up using config fi
279279
$container->register('newsletter_manager', 'NewsletterManager')
280280
->addMethodCall('setMailer', new Reference('mailer');
281281
282-
Dumping the Configuration for Performance
283-
-----------------------------------------
284-
285-
Using configuration files to manage the service container can be much easier
286-
to understand than using PHP once there are a lot of services. This ease comes
287-
at a price though when it comes to performance as the config files need to be
288-
parsed and the PHP configuration built from them. You can have the best of both
289-
worlds though by using configuration files and then dumping and caching the resulting
290-
configuration. The ``PhpDumper`` makes dumping the compiled container easy::
291-
292-
use Symfony\Component\DependencyInjection\ContainerBuilder;
293-
use Symfony\Component\Config\FileLocator;
294-
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
295-
use Symfony\Component\DependencyInjection\Dumper\PhpDumper
296-
297-
$container = new ContainerBuilder();
298-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
299-
$loader->load('services.xml');
300-
301-
$file = __DIR__ .'/cache/container.php';
302-
303-
if (file_exists($file)) {
304-
require_once $file;
305-
$container = new ProjectServiceContiner();
306-
} else {
307-
$container = new ContainerBuilder();
308-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
309-
$loader->load('services.xml');
310-
311-
$dumper = new PhpDumper($container);
312-
file_put_contents($file, $dumper->dump());
313-
}
314-
315-
``ProjectServiceContiner`` is the default name given to the dumped container
316-
class, you can change this though this with the ``class`` option when you dump
317-
it::
318-
319-
// ...
320-
$file = __DIR__ .'/cache/container.php';
321-
322-
if (file_exists($file)) {
323-
require_once $file;
324-
$container = new MyCachedContainer();
325-
} else {
326-
$container = new ContainerBuilder();
327-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
328-
$loader->load('services.xml');
329-
330-
$dumper = new PhpDumper($container);
331-
file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
332-
}
333-
334-
You will now get the speed of the PHP configured container with the ease of using
335-
configuration files. In the above example you will need to delete the cached
336-
container file whenever you make any changes. Adding a check for a variable that
337-
determines if you are in debug mode allows you to keep the speed of the cached
338-
container in production but getting an up to date configuration whilst developing
339-
your application::
340-
341-
// ...
342-
343-
// set $isDebug based on something in your project
344-
345-
$file = __DIR__ .'/cache/container.php';
346-
347-
if (!$isDebug && file_exists($file)) {
348-
require_once $file;
349-
$container = new MyCachedContainer();
350-
} else {
351-
$container = new ContainerBuilder();
352-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
353-
$loader->load('services.xml');
354-
355-
if(!$isDebug) {
356-
$dumper = new PhpDumper($container);
357-
file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
358-
}
359-
}

components/yaml.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Yaml
3+
14
The YAML Component
25
==================
36

contributing/documentation/translations.rst

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ for. Here is the list of the official *master* repositories:
2424
* *Romanian*: https://github.com/sebio/symfony-docs-ro
2525
* *Russian*: https://github.com/avalanche123/symfony-docs-ru
2626
* *Spanish*: https://github.com/gitnacho/symfony-docs-es
27+
* *Turkish*: https://github.com/symfony-tr/symfony-docs-tr
2728

2829
.. note::
2930

cookbook/assetic/apply_to_option.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Assetic; Apply Filters
2+
single: Assetic; Apply filters
33

44
How to Apply an Assetic Filter to a Specific File Extension
55
===========================================================

cookbook/assetic/jpeg_optimize.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Assetic; Image Optimization
2+
single: Assetic; Image optimization
33

44
How to Use Assetic For Image Optimization with Twig Functions
55
=============================================================

cookbook/bundles/best_practices.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Bundles; Best Practices
2+
single: Bundles; Best practices
33

44
Bundle Structure and Best Practices
55
===================================
@@ -9,7 +9,7 @@ from classes to controllers and web resources. Even if bundles are very
99
flexible, you should follow some best practices if you want to distribute them.
1010

1111
.. index::
12-
pair: Bundles; Naming Conventions
12+
pair: Bundles; Naming conventions
1313

1414
.. _bundles-naming-conventions:
1515

cookbook/bundles/extension.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. index::
22
single: Configuration; Semantic
3-
single: Bundle; Extension Configuration
3+
single: Bundle; Extension configuration
44

55
How to expose a Semantic Configuration for a Bundle
66
===================================================
@@ -90,7 +90,7 @@ The second method has several specific advantages:
9090

9191
.. index::
9292
single: Bundles; Extension
93-
single: Dependency Injection, Extension
93+
single: Dependency Injection; Extension
9494

9595
Creating an Extension Class
9696
---------------------------

cookbook/configuration/environments.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Environments;
2+
single: Environments
33

44
How to Master and Create new Environments
55
=========================================

cookbook/controller/error_pages.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. index::
2+
single: Controller; Customize error pages
3+
single: Error pages
4+
15
How to customize Error Pages
26
============================
37

cookbook/doctrine/common_extensions.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Doctrine; Common extensions
3+
14
Doctrine Extensions: Timestampable, Sluggable, Translatable, etc.
25
=================================================================
36

cookbook/doctrine/custom_dql_functions.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Doctrine; Custom DQL functions
3+
14
Registering Custom DQL Functions
25
================================
36

@@ -77,4 +80,4 @@ In Symfony, you can register your custom DQL functions as follows:
7780
),
7881
));
7982
80-
.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html
83+
.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html

cookbook/doctrine/event_listeners_subscribers.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Doctrine; Event listeners and subscribers
3+
14
.. _doctrine-event-config:
25

36
Registering Event Listeners and Subscribers
@@ -111,4 +114,4 @@ specific type of entity (e.g. a ``Product`` entity but not a ``BlogPost``
111114
entity), you should check for the class name of the entity in your method
112115
(as shown above).
113116

114-
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
117+
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html

cookbook/doctrine/file_uploads.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. index::
2+
single: Doctrine; File uploads
3+
4+
15
How to handle File Uploads with Doctrine
26
========================================
37

cookbook/doctrine/multiple_entity_managers.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Doctrine; Multiple entity managers
3+
14
How to work with Multiple Entity Managers
25
=========================================
36

cookbook/email/dev_environment.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Emails; In development
3+
14
How to Work with Emails During Development
25
==========================================
36

cookbook/email/spool.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Emails; Spooling
3+
14
How to Spool Email
25
==================
36

cookbook/form/data_transformers.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Form; Data transformers
3+
14
Using Data Transformers
25
=======================
36

cookbook/form/use_virtuals_forms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Form; Use virtual forms
2+
single: Form; Virtual forms
33

44
How to use the Virtual Form Field Option
55
========================================

cookbook/logging/monolog_email.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Logging; Emailling errors
3+
14
How to Configure Monolog to Email Errors
25
========================================
36

cookbook/security/force_https.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Security; Force HTTPS
3+
14
How to force HTTPS or HTTP for Different URLs
25
=============================================
36

cookbook/security/form_login.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Security; Customizing form login
3+
14
How to customize your Form Login
25
================================
36

cookbook/security/remember_me.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Security; "Remember me"
3+
14
How to add "Remember Me" Login Functionality
25
============================================
36

cookbook/security/securing_services.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. index::
2+
single: Security; Securing any service
3+
single: Security; Securing any method
4+
15
How to secure any Service or Method in your Application
26
=======================================================
37

cookbook/service_container/compiler_passes.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. index::
2+
single: Dependency Injection; Compiler passes
3+
single: Service Container; Compiler passes
4+
15
How to work with Compiler Passes in Bundles
26
===========================================
37

cookbook/service_container/scopes.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Dependency Injection; Scopes
3+
14
How to work with Scopes
25
=======================
36

cookbook/symfony1.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: symfony1
3+
14
How Symfony2 differs from symfony1
25
==================================
36

cookbook/testing/insulating_clients.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Tests
2+
single: Tests; Insulating clients
33

44
How to test the Interaction of several Clients
55
==============================================

cookbook/workflow/new_project_git.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Workflow; Git
3+
14
How to Create and store a Symfony2 Project in git
25
=================================================
36

cookbook/workflow/new_project_svn.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. index::
2+
single: Workflow; Subversion
3+
14
How to Create and store a Symfony2 Project in Subversion
25
========================================================
36

0 commit comments

Comments
 (0)