Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

cleaning#2753

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
gondo wants to merge15 commits intosymfony:2.3fromgondo:patch-1
Closed
Show file tree
Hide file tree
Changes from28 commits
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
50905ff
Adding lazy services documentation as of symfony/symfony#7890
OcramiusMay 7, 2013
c3c3e98
[Components][Console] Fixed typos for table helper
pierredupMay 8, 2013
931091d
Applying changes suggested by @WouterJ, adding lazy_services to compo…
OcramiusMay 9, 2013
abe537f
Merge pull request #2624 from pierredup/master
weaverryanMay 10, 2013
438c824
Made the Icu component compatible with ICU 3.8
webmozartMay 15, 2013
a981ae7
Merge pull request #2640 from bschussek/icu-3.8
weaverryanMay 16, 2013
a2bc822
Merge pull request #2619 from Ocramius/feature/proxy-manager-bridge
weaverryanMay 16, 2013
d7ea3a5
[#2619] Tweaks for new proxy/lazy services entry
weaverryanMay 16, 2013
2b7dcf9
Merge branch '2.2'
weaverryanMay 16, 2013
4c06860
Merge branch '2.3'
weaverryanMay 18, 2013
030a6f8
Merge branch '2.3'
weaverryanMay 29, 2013
37c86d6
Merge branch '2.3'
weaverryanJun 10, 2013
458c392
Merge branch '2.3'
weaverryanJun 12, 2013
ebdcaba
Merge branch '2.3'
weaverryanJun 12, 2013
26215a7
Fixing Security Entity Provider tutorial
weaverryanJun 12, 2013
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
3 changes: 2 additions & 1 deletionbook/doctrine.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -401,7 +401,8 @@ doesn't replace your existing methods).
The ``doctrine:generate:entities`` command saves a backup of the original
``Product.php`` named ``Product.php~``. In some cases, the presence of
this file can cause a "Cannot redeclare class" error. It can be safely
removed.
removed. You can also use the ``--no-backup`` option to prevent generating
these backup files.

Note that you don't *need* to use this command. Doctrine doesn't rely
on code generation. Like with normal PHP classes, you just need to make
Expand Down
2 changes: 1 addition & 1 deletioncomponents/dom_crawler.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -163,7 +163,7 @@ The crawler supports multiple ways of adding the content::
.. note::

When dealing with character sets other than ISO-8859-1, always add HTML
content using the :method:`Symfony\\Component\\DomCrawler\\Crawler::addHTMLContent``
content using the :method:`Symfony\\Component\\DomCrawler\\Crawler::addHTMLContent`
method where you can specify the second parameter to be your target character
set.

Expand Down
4 changes: 2 additions & 2 deletionscomponents/yaml/introduction.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -120,14 +120,14 @@ error occurred:
As the parser is re-entrant, you can use the same parser object to load
different YAML strings.

When loading a YAML file, it is sometimes better to use the
It may also be convenient to use the
:method:`Symfony\\Component\\Yaml\\Yaml::parse` wrapper method:

.. code-block:: php

use Symfony\Component\Yaml\Yaml;

$yaml = Yaml::parse('/path/to/file.yml');
$yaml = Yaml::parse(file_get_contents('/path/to/file.yml'));

The :method:`Symfony\\Component\\Yaml\\Yaml::parse` static method takes a YAML
string or a file containing YAML. Internally, it calls the
Expand Down
2 changes: 1 addition & 1 deletioncookbook/assetic/asset_management.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -143,7 +143,7 @@ You can see an example in the previous section.
.. caution::

When using the ``cssrewrite`` filter, don't refer to your CSS files using
the ``@AcmeFooBundle``. See the note in the above section for details.
the ``@AcmeFooBundle`` syntax. See the note in the above section for details.

Combining Assets
~~~~~~~~~~~~~~~~
Expand Down
9 changes: 3 additions & 6 deletionscookbook/bundles/inheritance.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,12 +97,9 @@ The same goes for routing files, validation configuration and other resources.

.. caution::

Translation files do not work in the same way as described above. All
translation files are accumulated into a set of "pools" (one for each)
domain. Symfony loads translation files from bundles first (in the order
that the bundles are initialized) and then from your ``app/Resources``
directory. If the same translation is specified in two resources, the
translation from the resource that's loaded last will win.
Translation files do not work in the same way as described above. Read
:ref:`override-translations` if you want to learn how to override
translations.

.. _`FOSUserBundle`: https://github.com/friendsofsymfony/fosuserbundle

27 changes: 24 additions & 3 deletionscookbook/bundles/override.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ Templates
---------

For information on overriding templates, see

* :ref:`overriding-bundle-templates`.
* :doc:`/cookbook/bundles/inheritance`

Expand All@@ -31,6 +32,7 @@ Controllers
Assuming the third-party bundle involved uses non-service controllers (which
is almost always the case), you can easily override controllers via bundle
inheritance. For more information, see :doc:`/cookbook/bundles/inheritance`.
If the controller is a service, see the next section on how to override it.

Services & Configuration
------------------------
Expand DownExpand Up@@ -69,7 +71,7 @@ Secondly, if the class is not available as a parameter, you want to make sure th
class is always overridden when your bundle is used, or you need to modify
something beyond just the class name, you should use a compiler pass::

// src/Acme/FooBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
// src/Acme/DemoBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
namespace Acme\DemoBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand All@@ -94,7 +96,11 @@ like adding a method call - you can only use the compiler pass method.
Entities & Entity mapping
-------------------------

In progress...
Due to the way Doctrine works, it is not possible to override entity mapping
of a bundle. However, if a bundle provides a mapped superclass (such as the
``User`` entity in the FOSUserBundle) one can override attributes and
associations. Learn more about this feature and its limitations in
`the Doctrine documentation`_.

Forms
-----
Expand All@@ -116,7 +122,22 @@ Validation metadata

In progress...

.. _override-translations:

Translations
------------

In progress...
Translations are not related to bundles, but to domains. That means that you
can override the translations from any translation file, as long as it is in
:ref:`the correct domain <translation-domains>`.

.. caution::

The last translation file always wins. That mean that you need to make
sure that the bundle containing *your* translations is loaded after any
bundle whose translations you're overriding. This is done in ``AppKernel``.

The file that always wins is the one that is placed in
``app/Resources/translations``, as those files are always loaded last.

.. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides
2 changes: 1 addition & 1 deletioncookbook/form/create_form_type_extension.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -239,7 +239,7 @@ it in the view::
}

// set an "image_url" variable that will be available when rendering this field
$view->set('image_url',$imageUrl);
$view->vars['image_url'] =$imageUrl;
}
}

Expand Down
2 changes: 1 addition & 1 deletioncookbook/form/data_transformers.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -337,7 +337,7 @@ it's quite easy::
{
$builder
->add('task')
->add('dueDate', null, array('widget' => 'single_text'));
->add('dueDate', null, array('widget' => 'single_text'))
->add('issue', 'issue_selector');
}

Expand Down
12 changes: 11 additions & 1 deletioncookbook/security/custom_authentication_provider.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,8 +137,9 @@ set an authenticated token in the security context if successful.

try {
$authToken = $this->authenticationManager->authenticate($token);

$this->securityContext->setToken($authToken);

return;
} catch (AuthenticationException $failed) {
// ... you might log something here

Expand All@@ -152,6 +153,11 @@ set an authenticated token in the security context if successful.
$event->setResponse($response);

}

// By default deny authorization
$response = new Response();
$response->setStatusCode(403);
$event->setResponse($response);
}
}

Expand DownExpand Up@@ -233,6 +239,10 @@ the ``PasswordDigest`` header value matches with the user's password.
if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) {
throw new NonceExpiredException('Previously used nonce detected');
}
// If cache directory does not exist we create it
if (!is_dir($this->cacheDir)) {
mkdir($this->cacheDir, 0777, true);
}
file_put_contents($this->cacheDir.'/'.$nonce, time());

// Validate Secret
Expand Down
2 changes: 1 addition & 1 deletioncookbook/validation/custom_constraint.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -231,7 +231,7 @@ not to the property:
# src/Acme/BlogBundle/Resources/config/validation.yml
Acme\DemoBundle\Entity\AcmeEntity:
constraints:
Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric: ~
-Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric: ~

.. code-block:: php-annotations

Expand Down
4 changes: 2 additions & 2 deletionsreference/dic_tags.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,15 +246,15 @@ For details on creating your own custom data collection, read the cookbook
article: :doc:`/cookbook/profiler/data_collector`.

doctrine.event_listener
--------------
-----------------------

**Purpose**: Add a Doctrine event listener

For details on creating Doctrine event listeners, read the cookbook article:
:doc:`/cookbook/doctrine/event_listeners_subscribers`.

doctrine.event_subscriber
--------------
-------------------------

**Purpose**: Add a Doctrine event subscriber

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp