diff --git a/components/asset.rst b/components/asset.rst index b289feb77e1..351db4e0874 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -66,7 +66,7 @@ any versioning:: // Absolute path echo $package->getUrl('/image.png'); // result: /image.png - + // Relative path echo $package->getUrl('image.png'); // result: image.png @@ -113,7 +113,7 @@ suffix to any asset path:: // Absolute path echo $package->getUrl('/image.png'); // result: /image.png?v1 - + // Relative path echo $package->getUrl('image.png'); // result: image.png?v1 @@ -132,7 +132,7 @@ string as the second argument of the ``StaticVersionStrategy`` constructor:: echo $package->getUrl('/image.png'); // result: /v1/image.png - + echo $package->getUrl('image.png'); // result: v1/image.png @@ -183,7 +183,7 @@ that path over and over again:: echo $package->getUrl('logo.png'); // result: /static/images/logo.png?v1 - + // Base path is ignored when using absolute paths echo $package->getUrl('/logo.png'); // result: /logo.png?v1 diff --git a/components/cache.rst b/components/cache.rst index 4b940850853..815fb3b9596 100644 --- a/components/cache.rst +++ b/components/cache.rst @@ -78,7 +78,7 @@ Now you can create, retrieve, update and delete items using this object:: // remove the cache key $cache->delete('stats.num_products'); - + // clear *all* cache keys $cache->clear(); diff --git a/components/cache/adapters/pdo_doctrine_dbal_adapter.rst b/components/cache/adapters/pdo_doctrine_dbal_adapter.rst index 76ac5860e89..f826c20d604 100644 --- a/components/cache/adapters/pdo_doctrine_dbal_adapter.rst +++ b/components/cache/adapters/pdo_doctrine_dbal_adapter.rst @@ -11,7 +11,6 @@ PDO & Doctrine DBAL Cache Adapter The PDO & Doctrine DBAL adapter was introduced in Symfony 3.2. - This adapter stores the cache items in an SQL database. It requires a `PDO`_, `Doctrine DBAL Connection`_, or `Data Source Name (DSN)`_ as its first parameter, and optionally a namespace, default cache lifetime, and options array as its second, diff --git a/components/cache/cache_pools.rst b/components/cache/cache_pools.rst index 751b645f80b..7b77a45feea 100644 --- a/components/cache/cache_pools.rst +++ b/components/cache/cache_pools.rst @@ -130,7 +130,7 @@ when all items are successfully deleted):: .. code-block:: terminal $ php bin/console cache:pool:clear - + # clears the "cache.app" pool $ php bin/console cache:pool:clear cache.app diff --git a/components/cache/psr6_psr16_adapters.rst b/components/cache/psr6_psr16_adapters.rst index 4d818449618..0557f942ab1 100644 --- a/components/cache/psr6_psr16_adapters.rst +++ b/components/cache/psr6_psr16_adapters.rst @@ -44,7 +44,7 @@ this use-case:: // a PSR-6 cache that uses your cache internally! $psr6Cache = new SimpleCacheAdapter($psr16Cache); - + // now use this wherever you want $githubApiClient = new GitHubApiClient($psr6Cache); @@ -81,6 +81,6 @@ this use-case:: // a PSR-16 cache that uses your cache internally! $psr16Cache = new Psr6Cache($psr6Cache); - + // now use this wherever you want $githubApiClient = new GitHubApiClient($psr16Cache); diff --git a/components/filesystem.rst b/components/filesystem.rst index 1445a48cc7d..932a0b9f1e5 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -6,7 +6,6 @@ The Filesystem Component The Filesystem component provides basic utilities for the filesystem. - Installation ------------ diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 137062093ad..e1916db1355 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -415,7 +415,7 @@ Modified PHPUnit script ----------------------- .. versionadded:: 3.2 - This modified PHPUnit script was introduced in the 3.2 version of + This modified PHPUnit script was introduced in the 3.2 version of this component. This bridge provides a modified version of PHPUnit that you can call by using @@ -448,7 +448,7 @@ If you have installed the bridge through Composer, you can run it by calling e.g .. tip:: - If you still need to use ``prophecy`` (but not ``symfony/yaml``), + If you still need to use ``prophecy`` (but not ``symfony/yaml``), then set the ``SYMFONY_PHPUNIT_REMOVE`` env var to ``symfony/yaml``. .. _PHPUnit: https://phpunit.de diff --git a/components/routing.rst b/components/routing.rst index ecb7a3d12eb..0664391a0bd 100644 --- a/components/routing.rst +++ b/components/routing.rst @@ -425,7 +425,6 @@ routes with UTF-8 characters: return $collection; - In this route, the ``utf8`` option set to ``true`` makes Symfony consider the ``.`` requirement to match any UTF-8 characters instead of just a single byte character. This means that so the following URLs would match: @@ -508,7 +507,7 @@ You can also include UTF-8 strings as routing requirements: // ... return $collection; - + .. tip:: In addition to UTF-8 characters, the Routing component also supports all diff --git a/components/serializer.rst b/components/serializer.rst index d49452c1861..e606f3fcbca 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -170,7 +170,6 @@ an exception when additional attributes are passed:: 'allow_extra_attributes' => false, )); - Deserializing in an Existing Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/var_dumper/advanced.rst b/components/var_dumper/advanced.rst index b54eed95bfa..36ebcc41dad 100644 --- a/components/var_dumper/advanced.rst +++ b/components/var_dumper/advanced.rst @@ -202,9 +202,9 @@ method:: Support for passing display options to the ``dump()`` method was introduced in Symfony 3.2. -The output format of a dumper can be fine tuned by the two flags +The output format of a dumper can be fine tuned by the two flags ``DUMP_STRING_LENGTH`` and ``DUMP_LIGHT_ARRAY`` which are passed as a bitmap -in the third constructor argument. They can also be set via environment +in the third constructor argument. They can also be set via environment variables when using :method:`assertDumpEquals($dump, $data, $message) ` during unit testing. diff --git a/controller.rst b/controller.rst index 30cce29bdec..de9dd1a7821 100644 --- a/controller.rst +++ b/controller.rst @@ -324,7 +324,7 @@ controller's service config: // app/config/services.php use AppBundle\Controller\LuckyController; - + $container->register(LuckyController::class) ->setPublic(true) ->addTag('controller.service_arguments', [ diff --git a/controller/service.rst b/controller/service.rst index 03191f13387..7513d8987f6 100644 --- a/controller/service.rst +++ b/controller/service.rst @@ -28,7 +28,7 @@ syntax: // src/AppBundle/Controller/HelloController.php // ... - + use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; /** diff --git a/create_framework/event_dispatcher.rst b/create_framework/event_dispatcher.rst index 12f8e39b433..b20bfde96a4 100644 --- a/create_framework/event_dispatcher.rst +++ b/create_framework/event_dispatcher.rst @@ -138,7 +138,7 @@ the registration of a listener for the ``response`` event:: $response->setContent($response->getContent().'GA CODE'); }); - + $controllerResolver = new ControllerResolver(); $argumentResolver = new ArgumentResolver(); diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index 0e730ad126e..45b7a3b7b15 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -115,10 +115,10 @@ type (``FileType``) is built. Let's see an example next. .. tip:: - There is an optional tag attribute called ``priority``, which - defaults to ``0`` and controls the order in which the form - type extensions are loaded (the higher the priority, the earlier - an extension is loaded). This is useful when you need to guarantee + There is an optional tag attribute called ``priority``, which + defaults to ``0`` and controls the order in which the form + type extensions are loaded (the higher the priority, the earlier + an extension is loaded). This is useful when you need to guarantee that one extension is loaded before or after another extension. .. versionadded:: 3.2 diff --git a/frontend/encore/babel.rst b/frontend/encore/babel.rst index dbe3862e9b2..1a060c950d1 100644 --- a/frontend/encore/babel.rst +++ b/frontend/encore/babel.rst @@ -15,7 +15,7 @@ Need to extend the Babel configuration further? The easiest way is via Encore // ... - + // first, install any presets you want to use (e.g. yarn add babel-preset-es2017) // then, modify the default Babel configuration .configureBabel(function(babelConfig) { diff --git a/frontend/encore/custom-loaders-plugins.rst b/frontend/encore/custom-loaders-plugins.rst index 45f0de12a70..66ce1f7c5cc 100644 --- a/frontend/encore/custom-loaders-plugins.rst +++ b/frontend/encore/custom-loaders-plugins.rst @@ -52,7 +52,7 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_): // webpack.config.js + var webpack = require('webpack'); - + Encore // ... diff --git a/quick_tour/the_controller.rst b/quick_tour/the_controller.rst index 2dc108cbe7c..2d13ed5cebf 100644 --- a/quick_tour/the_controller.rst +++ b/quick_tour/the_controller.rst @@ -335,7 +335,7 @@ And you can display the flash message in the template like this: {% endfor %} .. versionadded:: 3.3 - The ``app.flashes()`` Twig function was introduced in Symfony 3.3. Prior, + The ``app.flashes()`` Twig function was introduced in Symfony 3.3. Prior, you had to use ``app.session.flashBag()``. Final Thoughts diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 0b20baade5c..7cfb8dcb5b8 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -272,7 +272,6 @@ Full Default Configuration - .. index:: single: Configuration; Doctrine DBAL single: Doctrine; DBAL configuration diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index 6f98356f856..d35372cc707 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -188,7 +188,7 @@ would replace the ``choices`` option. The :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader` was introduced in Symfony 3.2. -You can use an instance of :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader` +You can use an instance of :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader` if you want to take advantage of lazy loading:: use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; diff --git a/security/custom_authentication_provider.rst b/security/custom_authentication_provider.rst index 90b7c0ff671..371b2abd3e1 100644 --- a/security/custom_authentication_provider.rst +++ b/security/custom_authentication_provider.rst @@ -255,13 +255,13 @@ the ``PasswordDigest`` header value matches with the user's password:: // Try to fetch the cache item from pool $cacheItem = $this->cachePool->getItem(md5($nonce)); - + // Validate that the nonce is *not* in cache // if it is, this could be a replay attack if ($cacheItem->isHit()) { throw new NonceExpiredException('Previously used nonce detected'); } - + // Store the item in cache for 5 minutes $cacheItem->set(null)->expiresAfter(300); $this->cachePool->save($cacheItem); diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index 1e9190cbb1f..26363da94fb 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -503,11 +503,11 @@ and add the following logic:: public function getCredentials(Request $request) { $csrfToken = $request->request->get('_csrf_token'); - + if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken('authenticate', $csrfToken))) { throw new InvalidCsrfTokenException('Invalid CSRF token.'); } - + // ... all your normal logic } diff --git a/serializer/custom_encoders.rst b/serializer/custom_encoders.rst index 1fa63944cd3..9403ee7f265 100644 --- a/serializer/custom_encoders.rst +++ b/serializer/custom_encoders.rst @@ -53,7 +53,7 @@ Registering it in your app If you use the Symfony Framework. then you probably want to register this encoder as a service in your app. If you're using the :ref:`default services.yml configuration `, -that's done automatically! +that's done automatically! .. tip:: diff --git a/service_container.rst b/service_container.rst index c45005ac877..015a949631d 100644 --- a/service_container.rst +++ b/service_container.rst @@ -668,7 +668,6 @@ But, you can control this and pass in a different logger: - .. code-block:: php // app/config/services.php diff --git a/service_container/3.3-di-changes.rst b/service_container/3.3-di-changes.rst index 678aab69364..09c8ee3c26a 100644 --- a/service_container/3.3-di-changes.rst +++ b/service_container/3.3-di-changes.rst @@ -373,7 +373,7 @@ The third big change is that, in a new Symfony 3.3 project, your controllers are // app/config/services.php // ... - + $definition->addTag('controller.service_arguments'); $this->registerClasses($definition, 'AppBundle\\Controller\\', '../../src/AppBundle/Controller/*'); diff --git a/service_container/configurators.rst b/service_container/configurators.rst index 855344df981..b4d7611ed0e 100644 --- a/service_container/configurators.rst +++ b/service_container/configurators.rst @@ -184,7 +184,6 @@ all the classes are already loaded as services. All you need to do is specify th $container->getDefinition(GreetingCardManager::class) ->setConfigurator(array(new Reference(EmailConfigurator::class), 'configure')); - .. versionadded:: 3.2 The ``service_id:method_name`` syntax for the YAML configuration format was introduced in Symfony 3.2. diff --git a/service_container/factories.rst b/service_container/factories.rst index 316d1cb7d44..5d3e6afd11a 100644 --- a/service_container/factories.rst +++ b/service_container/factories.rst @@ -153,7 +153,7 @@ Configuration of the service container then looks like this: # app/config/services.yml app.newsletter_manager: - class: AppBundle\Email\NewsletterManager + class: AppBundle\Email\NewsletterManager # new syntax factory: 'AppBundle\Email\NewsletterManagerFactory:createNewsletterManager' # old syntax diff --git a/session/avoid_session_start.rst b/session/avoid_session_start.rst index 57cc3226ff4..b5e8ab3f1c6 100644 --- a/session/avoid_session_start.rst +++ b/session/avoid_session_start.rst @@ -38,5 +38,5 @@ access the flash messages: {% endif %} .. versionadded:: 3.3 - The ``app.flashes()`` Twig function was introduced in Symfony 3.3. Prior, + The ``app.flashes()`` Twig function was introduced in Symfony 3.3. Prior, you had to use ``app.session.flashBag()``. diff --git a/workflow/usage.rst b/workflow/usage.rst index 0318b8e3878..3b824da565e 100644 --- a/workflow/usage.rst +++ b/workflow/usage.rst @@ -233,7 +233,7 @@ order: ``workflow.entered`` Similar to ``workflow.enter``, except the marking store is updated before this - event (making it a good place to flush data in Doctrine). + event (making it a good place to flush data in Doctrine). The three events being dispatched are: @@ -325,7 +325,6 @@ See example to make sure no blog post without title is moved to "review":: } } - Event Methods ~~~~~~~~~~~~~