From aa2d74c6f79ddf83d308e0841dba2a07db82ea63 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 20:13:47 +0100 Subject: [PATCH 01/23] Update dic_tags.rst --- reference/dic_tags.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index f6dc316c4c3..9d375cc35fe 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -1439,7 +1439,7 @@ If you do need to use this tag, just make a new class that implements the :class:`Symfony\\Component\\Validator\\ObjectInitializerInterface` interface. Then, tag it with the ``validator.initializer`` tag (it has no options). -For an example, see the ``EntityInitializer`` class inside the Doctrine +For an example, see the ``DoctrineInitializer`` class inside the Doctrine Bridge. .. _`Twig's documentation`: http://twig.sensiolabs.org/doc/advanced.html#creating-an-extension From f8d90ef9eff8cfb39a206a0b9e860fa7c6526658 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 19:38:37 +0100 Subject: [PATCH 02/23] Update voters.rst --- security/voters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/voters.rst b/security/voters.rst index b74c6fe615f..1b247441fc0 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -279,7 +279,7 @@ security configuration: > - + From 0e230de1126320db91742be13c886b9c5b591f6b Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 10:59:39 +0100 Subject: [PATCH 03/23] Update data_transformers.rst --- form/data_transformers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form/data_transformers.rst b/form/data_transformers.rst index b75ef91b733..c6a69fba3a9 100644 --- a/form/data_transformers.rst +++ b/form/data_transformers.rst @@ -35,7 +35,7 @@ Suppose you have a Task form with a tags ``text`` type:: { public function buildForm(FormBuilderInterface $builder, array $options) { - $builder->add('tags', 'text') + $builder->add('tags', 'text'); } public function configureOptions(OptionsResolver $resolver) From 0acbcda4ccbaacaba29aebb347688645f2afd550 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 01:06:28 +0100 Subject: [PATCH 04/23] Update routing.rst --- components/routing.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/routing.rst b/components/routing.rst index f6af13d1fac..1f23c62c2b2 100644 --- a/components/routing.rst +++ b/components/routing.rst @@ -206,6 +206,9 @@ to find a route that fits the given request you can also build a URL from a certain route:: use Symfony\Component\Routing\Generator\UrlGenerator; + use Symfony\Component\Routing\RequestContext; + use Symfony\Component\Routing\Route; + use Symfony\Component\Routing\RouteCollection; $routes = new RouteCollection(); $routes->add('show_post', new Route('/show/{slug}')); From a6a7bdc141388c0501680e6ed12e1338f2a0b15b Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 00:51:55 +0100 Subject: [PATCH 05/23] Update routing.rst --- components/routing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/routing.rst b/components/routing.rst index 1f23c62c2b2..686faf31ccb 100644 --- a/components/routing.rst +++ b/components/routing.rst @@ -324,7 +324,7 @@ a path to the main route definition and some other settings:: $resource, array $options = array(), RequestContext $context = null, - array $defaults = array() + LoggerInterface $logger = null ); With the ``cache_dir`` option you can enable route caching (if you provide a From 6ac0808c836a73fcd810ab1ad0122bb79848450c Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 01:01:37 +0100 Subject: [PATCH 06/23] Update hostname_pattern.rst --- routing/hostname_pattern.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routing/hostname_pattern.rst b/routing/hostname_pattern.rst index 4c49199fcaa..a647c2549b0 100644 --- a/routing/hostname_pattern.rst +++ b/routing/hostname_pattern.rst @@ -193,7 +193,8 @@ instance, if you want to match both ``m.example.com`` and + xsi:schemaLocation="http://symfony.com/schema/routing + http://symfony.com/schema/routing/routing-1.0.xsd"> AcmeDemoBundle:Main:mobileHomepage @@ -251,7 +252,8 @@ You can also set the host option on imported routes: + xsi:schemaLocation="http://symfony.com/schema/routing + http://symfony.com/schema/routing/routing-1.0.xsd"> From 8676bb832fa40d4630584dedef6b72f8bdbc9331 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 10:38:31 +0100 Subject: [PATCH 07/23] Update action_method.rst --- form/action_method.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form/action_method.rst b/form/action_method.rst index 27fdddfb1ac..f92bcaf3a69 100644 --- a/form/action_method.rst +++ b/form/action_method.rst @@ -47,7 +47,7 @@ to the ``form()`` or the ``form_start()`` helper functions: .. code-block:: html+php - + start($form, array( 'action' => $view['router']->generate('target_route'), 'method' => 'GET', From e722d43c5e4d6821a01ca65f24965053d6b303d3 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 28 Mar 2017 10:54:07 +0100 Subject: [PATCH 08/23] Update create_form_type_extension.rst --- form/create_form_type_extension.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index e467c20508f..4368d920c4c 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -120,7 +120,7 @@ tag: $container ->register('app.image_type_extension', ImageTypeExtension::class) - ->addTag('form.type_extension', array('alias' => 'file')); + ->addTag('form.type_extension', array('alias' => 'file')) ; The ``alias`` key of the tag is the type of field that this extension should From cbe638db7e6160afdc216142c97f00d0266db203 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Thu, 23 Mar 2017 20:07:59 +0000 Subject: [PATCH 09/23] Update the container variable name --- configuration.rst | 2 +- doctrine.rst | 2 +- testing/database.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration.rst b/configuration.rst index 96e8ff206a7..eeafbcc1453 100644 --- a/configuration.rst +++ b/configuration.rst @@ -316,7 +316,7 @@ configure DoctrineBundle and other parts of Symfony: .. code-block:: php // app/config/config.php - $configuration->loadFromExtension('doctrine', array( + $container->loadFromExtension('doctrine', array( 'dbal' => array( 'driver' => 'pdo_mysql', // ... diff --git a/doctrine.rst b/doctrine.rst index 5e44a7f0f54..faabea88c27 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -95,7 +95,7 @@ information. By convention, this information is usually configured in an .. code-block:: php // app/config/config.php - $configuration->loadFromExtension('doctrine', array( + $container->loadFromExtension('doctrine', array( 'dbal' => array( 'driver' => 'pdo_mysql', 'host' => '%database_host%', diff --git a/testing/database.rst b/testing/database.rst index 6ea86ec45c6..82abbc12125 100644 --- a/testing/database.rst +++ b/testing/database.rst @@ -145,7 +145,7 @@ configuration: .. code-block:: php // app/config/config_test.php - $configuration->loadFromExtension('doctrine', array( + $container->loadFromExtension('doctrine', array( 'dbal' => array( 'host' => 'localhost', 'dbname' => 'testdb', From 7b2104b3f4490f6325b6c29e28f3308a11069c19 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Fri, 24 Mar 2017 20:33:09 +0000 Subject: [PATCH 10/23] Update validation.rst --- validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validation.rst b/validation.rst index f65c62e0fd8..9322197b5f4 100644 --- a/validation.rst +++ b/validation.rst @@ -155,7 +155,7 @@ message: .. code-block:: text - AppBundle\Author.name: + AppBundle\Entity\Author.name: This value should not be blank If you insert a value into the ``name`` property, the happy success message From 381165b2a332331398e6921b8ee2ead3d4be334b Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Fri, 24 Mar 2017 20:57:21 +0000 Subject: [PATCH 11/23] Update sequence_provider.rst --- validation/sequence_provider.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation/sequence_provider.rst b/validation/sequence_provider.rst index ae1dd0e144e..bcf2f388e86 100644 --- a/validation/sequence_provider.rst +++ b/validation/sequence_provider.rst @@ -234,10 +234,10 @@ entity and a new constraint group called ``Premium``: public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('name', new Assert\NotBlank()); - $metadata->addPropertyConstraint('creditCard', new Assert\CardScheme( + $metadata->addPropertyConstraint('creditCard', new Assert\CardScheme(array( 'schemes' => array('VISA'), 'groups' => array('Premium'), - )); + ))); } } From 988756cd8dcfb32afe557a05b2e6b030cfbac42f Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Mon, 27 Mar 2017 21:00:23 +0100 Subject: [PATCH 12/23] Update cache_invalidation.rst --- http_cache/cache_invalidation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http_cache/cache_invalidation.rst b/http_cache/cache_invalidation.rst index 9c649d4df85..a67adb470c4 100644 --- a/http_cache/cache_invalidation.rst +++ b/http_cache/cache_invalidation.rst @@ -74,9 +74,9 @@ Here is how you can configure the Symfony reverse proxy to support the $response = new Response(); if ($this->getStore()->purge($request->getUri())) { - $response->setStatusCode(200, 'Purged'); + $response->setStatusCode(Response::HTTP_OK, 'Purged'); } else { - $response->setStatusCode(404, 'Not found'); + $response->setStatusCode(Response::HTTP_NOT_FOUND, 'Not found'); } return $response; From 8810a59fa3aa30ecb46a30328f08f5d8547db923 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Mon, 27 Mar 2017 21:12:15 +0100 Subject: [PATCH 13/23] Update esi.rst --- http_cache/esi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_cache/esi.rst b/http_cache/esi.rst index 5d881be67a2..5737b2a99b1 100644 --- a/http_cache/esi.rst +++ b/http_cache/esi.rst @@ -156,7 +156,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags: array('maxPerPage' => 5), UrlGeneratorInterface::ABSOLUTE_URL ), - array('strategy' => 'esi'), + array('strategy' => 'esi') ) ?> By using the ``esi`` renderer (via the ``render_esi()`` Twig function), you From 74de9673c1ffe7e5077c9de4f53a16e83aaddc0b Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Thu, 23 Mar 2017 11:46:04 +0000 Subject: [PATCH 14/23] Update authentication.rst --- components/security/authentication.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/security/authentication.rst b/components/security/authentication.rst index 753c7d00b7f..f0edcd9516e 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -234,6 +234,7 @@ own, it just needs to follow these rules: } // ... + } } Using Password Encoders From 2e8998428daf36fcdab5e500e63414fe26ff071e Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Thu, 23 Mar 2017 11:31:22 +0000 Subject: [PATCH 15/23] Update authentication.rst --- components/security/authentication.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/security/authentication.rst b/components/security/authentication.rst index f0edcd9516e..f8b9dc8aac4 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -76,6 +76,7 @@ The default authentication manager is an instance of :class:`Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager`:: use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager; + use Symfony\Component\Security\Core\Exception\AuthenticationException; // instances of Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface $providers = array(...); From 68ab0dbe8eacb0c1debad12bb8ba2451137638f0 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Wed, 22 Mar 2017 22:38:01 +0000 Subject: [PATCH 16/23] Update impersonating_user.rst --- security/impersonating_user.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/impersonating_user.rst b/security/impersonating_user.rst index a8a4d162a46..9b7224bb5ea 100644 --- a/security/impersonating_user.rst +++ b/security/impersonating_user.rst @@ -97,7 +97,7 @@ to show a link to exit impersonation: " > Exit impersonation From 39adc313de80446e5070306e045fd650b7a00c84 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Wed, 22 Mar 2017 19:59:11 +0000 Subject: [PATCH 17/23] Update security.rst --- security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security.rst b/security.rst index 00ed80fc157..cef331c936f 100644 --- a/security.rst +++ b/security.rst @@ -257,7 +257,7 @@ user to be logged in to access this URL: ), 'access_control' => array( // require ROLE_ADMIN for /admin* - array('path' => '^/admin', 'role' => 'ROLE_ADMIN'), + array('path' => '^/admin', 'roles' => 'ROLE_ADMIN'), ), )); From e03e86689b4bde763063a84204f6c4cac8f85ad6 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Wed, 22 Mar 2017 19:50:38 +0000 Subject: [PATCH 18/23] Update security.rst --- security.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security.rst b/security.rst index cef331c936f..d76139854e8 100644 --- a/security.rst +++ b/security.rst @@ -86,11 +86,11 @@ configuration looks like this: ), 'firewalls' => array( 'dev' => array( - 'pattern' => '^/(_(profiler|wdt)|css|images|js)/', - 'security' => false, + 'pattern' => '^/(_(profiler|wdt)|css|images|js)/', + 'security' => false, ), 'default' => array( - 'anonymous' => null, + 'anonymous' => null, ), ), )); From f66ded6e28ffeae822b001786bf23f6c12d8671d Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Sun, 19 Mar 2017 01:14:22 +0000 Subject: [PATCH 19/23] Update esi.rst --- http_cache/esi.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http_cache/esi.rst b/http_cache/esi.rst index 5737b2a99b1..f14b6fac8db 100644 --- a/http_cache/esi.rst +++ b/http_cache/esi.rst @@ -137,9 +137,10 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags: .. code-block:: html+php - + render( new ControllerReference( 'AppBundle:News:latest', @@ -148,8 +149,10 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags: array('strategy' => 'esi') ) ?> + render( $view['router']->generate( 'latest_news', From b4d6c50b96ca2169cfd060c5991969835c459773 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Thu, 16 Mar 2017 19:50:07 +0000 Subject: [PATCH 20/23] Fix some Doctrine XML configurations --- http_cache/esi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_cache/esi.rst b/http_cache/esi.rst index f14b6fac8db..494865d0aa0 100644 --- a/http_cache/esi.rst +++ b/http_cache/esi.rst @@ -237,7 +237,7 @@ that must be enabled in your configuration: