Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 704d206

Browse filesBrowse files
committed
Merge branch '2.4'
2 parents 797cbd5 + fc2698b commit 704d206
Copy full SHA for 704d206

File tree

Expand file treeCollapse file tree

5 files changed

+27
-8
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+27
-8
lines changed

‎components/class_loader/cache_class_loader.rst

Copy file name to clipboardExpand all lines: components/class_loader/cache_class_loader.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ ApcClassLoader
3434
// instance of a class that implements a findFile() method, like the ClassLoader
3535
$loader = ...;
3636
37-
// my_prefix is the APC namespace prefix to use
38-
$cachedLoader = new ApcClassLoader('my_prefix', $loader);
37+
// sha1(__FILE__) generates an APC namespace prefix
38+
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
3939
4040
// register the cached class loader
4141
$cachedLoader->register();
@@ -54,8 +54,8 @@ it is straightforward::
5454
// instance of a class that implements a findFile() method, like the ClassLoader
5555
$loader = ...;
5656
57-
// my_prefix is the XCache namespace
58-
$cachedLoader = new XcacheClassLoader('my_prefix', $loader);
57+
// sha1(__FILE__) generates an XCache namespace prefix
58+
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
5959
6060
// register the cached class loader
6161
$cachedLoader->register();

‎components/form/type_guesser.rst

Copy file name to clipboardExpand all lines: components/form/type_guesser.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The ``TypeGuess`` constructor requires 3 options:
7979
want to set the ``class`` option). If no types are guessed, this should be
8080
set to an empty array;
8181
* The confidence that the guessed type is correct. This can be one of the
82-
constants of the :class:`Symfony\\Component\\Form\\Guess\Guess` class:
82+
constants of the :class:`Symfony\\Component\\Form\\Guess\\Guess` class:
8383
``LOW_CONFIDENCE``, ``MEDIUM_CONFIDENCE``, ``HIGH_CONFIDENCE``,
8484
``VERY_HIGH_CONFIDENCE``. After all type guessers have been executed, the
8585
type with the highest confidence is used.
@@ -105,7 +105,7 @@ With this knowledge, you can easily implement the ``guessType`` method of the
105105
// otherwise, base the type on the @var annotation
106106
switch ($annotations['var']) {
107107
case 'string':
108-
// there is a high confidence that the type is a string when
108+
// there is a high confidence that the type is text when
109109
// @var string is used
110110
return new TypeGuess('text', array(), Guess::HIGH_CONFIDENCE);
111111

‎cookbook/form/form_customization.rst

Copy file name to clipboardExpand all lines: cookbook/form/form_customization.rst
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,23 @@ field whose *id* is ``product_name`` (and name is ``product[name]``).
660660
``ProductType`` equates to ``product``). If you're not sure what your
661661
form name is, just view the source of your generated form.
662662

663+
If you want to change the ``product`` or ``name`` portion of the block
664+
name ``_product_name_widget`` you can set the ``block_name`` option in your
665+
form type::
666+
667+
use Symfony\Component\Form\FormBuilderInterface;
668+
669+
public function buildForm(FormBuilderInterface $builder, array $options)
670+
{
671+
// ...
672+
673+
$builder->add('name', 'text', array(
674+
'block_name' => 'custom_name',
675+
));
676+
}
677+
678+
Then the block name will be ``_product_custom_name_widget``.
679+
663680
You can also override the markup for an entire field row using the same method:
664681

665682
.. configuration-block::

‎cookbook/routing/custom_route_loader.rst

Copy file name to clipboardExpand all lines: cookbook/routing/custom_route_loader.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ off the names of the action methods in a controller.
2020

2121
There are many bundles out there that use their own route loaders to
2222
accomplish cases like those described above, for instance
23-
`FOSRestBundle`_, `KnpRadBundle`_ and `SonataAdminBundle`_.
23+
`FOSRestBundle`_, `JMSI18nRoutingBundle`_, `KnpRadBundle`_ and `SonataAdminBundle`_.
2424

2525
Loading Routes
2626
--------------
@@ -262,5 +262,6 @@ configuration file - you can call the
262262
loader (YAML, XML, PHP, annotation, etc.).
263263

264264
.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
265+
.. _`JMSI18nRoutingBundle`: https://github.com/schmittjoh/JMSI18nRoutingBundle
265266
.. _`KnpRadBundle`: https://github.com/KnpLabs/KnpRadBundle
266267
.. _`SonataAdminBundle`: https://github.com/sonata-project/SonataAdminBundle

‎cookbook/routing/scheme.rst

Copy file name to clipboardExpand all lines: cookbook/routing/scheme.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ to always use ``http``.
6969
The Security component provides another way to enforce HTTP or HTTPS via
7070
the ``requires_channel`` setting. This alternative method is better suited
7171
to secure an "area" of your website (all URLs under ``/admin``) or when
72-
you want to secure URLs defined in a third party bundle.
72+
you want to secure URLs defined in a third party bundle (see
73+
:doc:`/cookbook/security/force_https` for more details).

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.