Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clean up #8947

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 0 additions & 1 deletion components/cache/adapters/pdo_doctrine_dbal_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/cache/cache_pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ when all items are successfully deleted)::
.. code-block:: terminal

$ php bin/console cache:pool:clear <cache-pool-name>

# clears the "cache.app" pool
$ php bin/console cache:pool:clear cache.app

Expand Down
4 changes: 2 additions & 2 deletions components/cache/psr6_psr16_adapters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
1 change: 0 additions & 1 deletion components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The Filesystem Component

The Filesystem component provides basic utilities for the filesystem.


Installation
------------

Expand Down
4 changes: 2 additions & 2 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions components/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ an exception when additional attributes are passed::
'allow_extra_attributes' => false,
));


Deserializing in an Existing Object
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions components/var_dumper/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) <Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait::assertDumpEquals>`
during unit testing.
Expand Down
2 changes: 1 addition & 1 deletion controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 1 addition & 1 deletion controller/service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ syntax:

// src/AppBundle/Controller/HelloController.php
// ...

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

/**
Expand Down
2 changes: 1 addition & 1 deletion create_framework/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions form/create_form_type_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/encore/babel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/encore/custom-loaders-plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_):

// webpack.config.js
+ var webpack = require('webpack');

Encore
// ...

Expand Down
2 changes: 1 addition & 1 deletion quick_tour/the_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ Full Default Configuration
</doctrine:config>
</container>


.. index::
single: Configuration; Doctrine DBAL
single: Doctrine; DBAL configuration
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions security/guard_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion serializer/custom_encoders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <service-container-services-load-example>`,
that's done automatically!
that's done automatically!

.. tip::

Expand Down
1 change: 0 additions & 1 deletion service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ But, you can control this and pass in a different logger:
</services>
</container>


.. code-block:: php

// app/config/services.php
Expand Down
2 changes: 1 addition & 1 deletion service_container/3.3-di-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/*');

Expand Down
1 change: 0 additions & 1 deletion service_container/configurators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion service_container/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion session/avoid_session_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()``.
3 changes: 1 addition & 2 deletions workflow/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -325,7 +325,6 @@ See example to make sure no blog post without title is moved to "review"::
}
}


Event Methods
~~~~~~~~~~~~~

Expand Down