Skip to content

Commit b7a7f10

Browse files
noniagriconomieOskarStark
authored andcommitted
[Logger] [Processor] additional info on processor
1 parent 76be978 commit b7a7f10

File tree

156 files changed

+2030
-1535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2030
-1535
lines changed

_build/_themes/_exts/symfonycom/sphinx/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TerminalLexer(RegexLexer):
1010
tokens = {
1111
'root': [
1212
('^\$', Generic.Prompt, 'bash-prompt'),
13-
('^[^\n>]+>', Generic.Prompt, 'dos-prompt'),
13+
('^>', Generic.Prompt, 'dos-prompt'),
1414
('^#.+$', Comment.Single),
1515
('^.+$', Generic.Output),
1616
],

_build/maintainer_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ interface. Then:
9393
Merging Process
9494
~~~~~~~~~~~~~~~
9595

96-
At first it's common to make mistakes and merge things badly. Don't worry. This
96+
At first, it's common to make mistakes and merge things badly. Don't worry. This
9797
has happened to all of us and we've always been able to recover from any mistake.
9898

9999
Step 1: Select the right branch to merge

_build/redirection_map

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,3 +427,5 @@
427427
/contributing/community/other /contributing/community
428428
/profiler/storage /profiler
429429
/setup/composer /setup
430+
/security/security_checker /setup
431+
/service_container/parameters /configuration
Loading

_images/form/form-custom-type-postal-address-fragment-names.svg

Lines changed: 1 addition & 0 deletions
Loading

_images/form/form-custom-type-postal-address.svg

Lines changed: 1 addition & 0 deletions
Loading
Binary file not shown.
Binary file not shown.

best_practices/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ that fit the philosophy of the framework as envisioned by its original creator
2525

2626
.. note::
2727

28-
**Best practice** is a noun that means *"a well defined procedure that is
28+
**Best practice** is a noun that means *"a well-defined procedure that is
2929
known to produce near-optimum results"*. And that's exactly what this
3030
guide aims to provide. Even if you don't agree with every recommendation,
3131
we believe these will help you build great applications with less complexity.

best_practices/templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ be used as a Twig extension.
119119
Next: :doc:`/best_practices/forms`
120120

121121
.. _`Twig`: https://twig.symfony.com/
122-
.. _`Parsedown`: http://parsedown.org/
122+
.. _`Parsedown`: https://parsedown.org/

bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Providing an XML Schema
381381

382382
XML has a very useful feature called `XML schema`_. This allows you to
383383
describe all possible elements and attributes and their values in an XML Schema
384-
Definition (an xsd file). This XSD file is used by IDEs for auto completion and
384+
Definition (an XSD file). This XSD file is used by IDEs for auto completion and
385385
it is used by the Config component to validate the elements.
386386

387387
In order to use the schema, the XML configuration file must provide an

bundles/inheritance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Use Bundle Inheritance to Override Parts of a Bundle
55
===========================================================
66

7-
.. caution::
7+
.. deprecated:: 3.4
88

99
Bundle inheritance was removed in Symfony 4.0, but you can
1010
:doc:`override any part of a bundle </bundles/override>` without

cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Each custom pool becomes a service where the service id is the name of the pool
278278
using the camel case version of its name - e.g. ``custom_thing.cache`` can be
279279
injected automatically by naming the argument ``$customThingCache`` and type-hinting it
280280
with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
281-
``Psr\\Cache\\CacheItemPoolInterface``::
281+
``Psr\Cache\CacheItemPoolInterface``::
282282

283283
use Symfony\Contracts\Cache\CacheInterface;
284284

components/asset.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ simple. Hardcoding URLs can be a disadvantage because:
3030
is essential for some applications because it allows you to control how
3131
the assets are cached. The Asset component allows you to define different
3232
versioning strategies for each package;
33-
* **Moving assets location** is cumbersome and error-prone: it requires you to
33+
* **Moving assets' location** is cumbersome and error-prone: it requires you to
3434
carefully update the URLs of all assets included in all templates. The Asset
3535
component allows to move assets effortlessly just by changing the base path
3636
value associated with the package of assets;
@@ -302,7 +302,7 @@ constructor::
302302
// result: http://static2.example.com/images/icon.png?v1
303303

304304
For each asset, one of the URLs will be randomly used. But, the selection
305-
is deterministic, meaning that each asset will be always served by the same
305+
is deterministic, meaning that each asset will always be served by the same
306306
domain. This behavior simplifies the management of HTTP cache.
307307

308308
Request Context Aware Assets

components/cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Now you can create, retrieve, update and delete items using this cache pool::
182182
// retrieve the cache item
183183
$productsCount = $cache->getItem('stats.products_count');
184184
if (!$productsCount->isHit()) {
185-
// ... item does not exists in the cache
185+
// ... item does not exist in the cache
186186
}
187187
// retrieve the value stored by the item
188188
$total = $productsCount->get();

components/cache/adapters/chain_adapter.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ given adapters. This exposes a simple and efficient method for creating a layere
1515
The ChainAdapter must be provided an array of adapters and optionally a maximum cache
1616
lifetime as its constructor arguments::
1717

18-
use Symfony\Component\Cache\Adapter\ApcuAdapter;
19-
20-
$cache = new ChainAdapter([
18+
use Symfony\Component\Cache\Adapter\ChainAdapter;
2119

20+
$cache = new ChainAdapter(
2221
// The ordered list of adapters used to fetch cached items
2322
array $adapters,
2423

2524
// The max lifetime of items propagated from lower adapters to upper ones
2625
$maxLifetime = 0
27-
]);
26+
);
2827

2928
.. note::
3029

@@ -59,11 +58,5 @@ incompatible adapters are silently ignored::
5958
new FilesystemAdapter(), // DOES implement PruneableInterface
6059
]);
6160

62-
// prune will proxy the call to FilesystemAdapter while silently skipping ApcuAdapter
61+
// prune will proxy the call to FilesystemAdapter while silently skip ApcuAdapter
6362
$cache->prune();
64-
65-
.. note::
66-
67-
Since Symfony 3.4, this adapter implements :class:`Symfony\\Component\\Cache\\PruneableInterface`,
68-
allowing for manual :ref:`pruning of expired cache entries <component-cache-cache-pool-prune>` by
69-
calling its ``prune()`` method.

components/cache/adapters/memcached_adapter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Available Options
241241

242242
``server_failure_limit`` (type: ``int``, default: ``0``)
243243
Specifies the failure limit for server connection attempts before marking
244-
the server as "dead". The server will remaining in the server pool unless
244+
the server as "dead". The server will remain in the server pool unless
245245
``auto_eject_hosts`` is enabled.
246246

247247
Valid option values include *any positive integer*.

components/cache/cache_invalidation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ change in the state of your model. The most basic kind of invalidation is direct
1010
items deletion. But when the state of a primary resource has spread across
1111
several cached items, keeping them in sync can be difficult.
1212

13-
The Symfony Cache component provides two mechanisms to help solving this problem:
13+
The Symfony Cache component provides two mechanisms to help solve this problem:
1414

1515
* :ref:`Tags-based invalidation <cache-component-tags>` for managing data dependencies;
1616
* :ref:`Expiration based invalidation <cache-component-expiration>` for time-related dependencies.

components/cache/cache_items.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ corresponding *getter* methods::
6767
Cache Item Expiration
6868
~~~~~~~~~~~~~~~~~~~~~
6969

70-
By default cache items are stored permanently. In practice, this "permanent
70+
By default, cache items are stored permanently. In practice, this "permanent
7171
storage" can vary greatly depending on the type of cache being used, as
7272
explained in the :doc:`/components/cache/cache_pools` article.
7373

components/cache/cache_pools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Cache Pools and Supported Adapters
1616

1717
Cache Pools are the logical repositories of cache items. They perform all the
1818
common operations on items, such as saving them or looking for them. Cache pools
19-
are independent from the actual cache implementation. Therefore, applications
19+
are independent of the actual cache implementation. Therefore, applications
2020
can keep using the same cache pool even if the underlying cache mechanism
2121
changes from a file system based cache to a Redis or database based cache.
2222

@@ -27,7 +27,7 @@ Creating Cache Pools
2727

2828
Cache Pools are created through the **cache adapters**, which are classes that
2929
implement both :class:`Symfony\\Contracts\\Cache\\CacheInterface` and
30-
``Psr\\Cache\\CacheItemPoolInterface``. This component provides several adapters
30+
``Psr\Cache\CacheItemPoolInterface``. This component provides several adapters
3131
ready to use in your applications.
3232

3333
.. toctree::

components/cache/psr6_psr16_adapters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ this use-case::
8282
$psr6Cache = new FilesystemAdapter();
8383

8484
// a PSR-16 cache that uses your cache internally!
85-
$psr16Cache = new Psr6Cache($psr6Cache);
85+
$psr16Cache = new Psr16Cache($psr6Cache);
8686

8787
// now use this wherever you want
8888
$githubApiClient = new GitHubApiClient($psr16Cache);

components/config/definition.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ For all nodes:
531531
Appending Sections
532532
------------------
533533

534-
If you have a complex configuration to validate then the tree can grow to
534+
If you have a complex configuration to validate, then the tree can grow to
535535
be large and you may want to split it up into sections. You can do this
536536
by making a section a separate node and then appending it into the main
537537
tree with ``append()``::
@@ -702,8 +702,8 @@ and sometimes only:
702702
703703
<connection>default</connection>
704704
705-
By default ``connection`` would be an array in the first case and a string
706-
in the second making it difficult to validate. You can ensure it is always
705+
By default, ``connection`` would be an array in the first case and a string
706+
in the second, making it difficult to validate. You can ensure it is always
707707
an array with ``fixXmlConfig()``.
708708

709709
You can further control the normalization process if you need to. For example,

components/console/changing_default_command.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ name to the ``setDefaultCommand()`` method::
1616

1717
class HelloWorldCommand extends Command
1818
{
19+
protected static $defaultName = 'hello:world';
20+
1921
protected function configure()
2022
{
21-
$this->setName('hello:world')
22-
->setDescription('Outputs \'Hello World\'');
23+
$this->setDescription('Outputs "Hello World"');
2324
}
2425

2526
protected function execute(InputInterface $input, OutputInterface $output)

components/console/console_arguments.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ Have a look at the following command that has three options::
2323

2424
class DemoArgsCommand extends Command
2525
{
26+
protected static $defaultName = 'demo:args';
27+
2628
protected function configure()
2729
{
2830
$this
29-
->setName('demo:args')
3031
->setDescription('Describe args behaviors')
3132
->setDefinition(
3233
new InputDefinition([

components/console/events.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ Listeners receive a
154154
It is then dispatched just after the ``ConsoleEvents::ERROR`` event.
155155
The exit code received in this case is the exception code.
156156

157-
.. _`reserved exit codes`: http://www.tldp.org/LDP/abs/html/exitcodes.html
157+
.. _`reserved exit codes`: https://www.tldp.org/LDP/abs/html/exitcodes.html

components/console/helpers/progressbar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ which starts, advances and finishes the progress bar automatically::
112112

113113
If ``$iterable = [1, 2]``, the previous code will output the following:
114114

115-
.. code-block:: terminal
115+
.. code-block:: console
116116
117117
0/2 [>---------------------------] 0%
118118
1/2 [==============>-------------] 50%

components/console/helpers/table.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You can optionally display titles at the top and the bottom of the table::
8888
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
8989
+---------------+--------- Page 1/2 -------+------------------+
9090
91-
By default the width of the columns is calculated automatically based on their
91+
By default, the width of the columns is calculated automatically based on their
9292
contents. Use the :method:`Symfony\\Component\\Console\\Helper\\Table::setColumnWidths`
9393
method to set the column widths explicitly::
9494

components/console/logger.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ You can rely on the logger to use this dependency inside a command::
4444

4545
class MyCommand extends Command
4646
{
47+
protected static $defaultName = 'my:command';
48+
4749
protected function configure()
4850
{
4951
$this
50-
->setName('my:command')
5152
->setDescription(
5253
'Use an external dependency requiring a PSR-3 logger'
5354
)

components/dependency_injection/compilation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ serves at dumping the compiled container::
469469
}
470470

471471
``ProjectServiceContainer`` is the default name given to the dumped container
472-
class. However you can change this with the ``class`` option when you
472+
class. However, you can change this with the ``class`` option when you
473473
dump it::
474474

475475
// ...

components/dotenv.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ Use environment variables in values by prefixing variables with ``$``:
141141
DB_USER=root
142142
DB_PASS=${DB_USER}pass # Include the user as a password prefix
143143
144+
.. note::
145+
146+
The order is important when some env var depends on the value of other env
147+
vars. In the above example, ``DB_PASS`` must be defined after ``DB_USER``.
148+
Moreover, if you define multiple ``.env`` files and put ``DB_PASS`` first,
149+
its value will depend on the ``DB_USER`` value defined in other files
150+
instead of the value defined in this file.
151+
144152
Embed commands via ``$()`` (not supported on Windows):
145153

146154
.. code-block:: terminal

components/event_dispatcher.rst

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Introduction
1313
------------
1414

1515
Object-oriented code has gone a long way to ensuring code extensibility.
16-
By creating classes that have well defined responsibilities, your code becomes
16+
By creating classes that have well-defined responsibilities, your code becomes
1717
more flexible and a developer can extend them with subclasses to modify
1818
their behaviors. But if they want to share the changes with other developers
1919
who have also made their own subclasses, code inheritance is no longer the
@@ -111,7 +111,7 @@ Often times, data about a specific event needs to be passed along with the
111111
case, a special subclass that has additional methods for retrieving and
112112
overriding information can be passed when dispatching an event. For example,
113113
the ``kernel.response`` event uses a
114-
:class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent`, which
114+
:class:`Symfony\\Component\\HttpKernel\\Event\\ResponseEvent`, which
115115
contains methods to get and even replace the ``Response`` object.
116116

117117
The Dispatcher
@@ -291,8 +291,8 @@ Dispatch the Event
291291

292292
The :method:`Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch`
293293
method notifies all listeners of the given event. It takes two arguments:
294-
the name of the event to dispatch and the ``Event`` instance to pass to
295-
each listener of that event::
294+
the ``Event`` instance to pass to each listener of that event and the name
295+
of the event to dispatch and ::
296296

297297
use Acme\Store\Event\OrderPlacedEvent;
298298
use Acme\Store\Order;
@@ -303,7 +303,7 @@ each listener of that event::
303303

304304
// creates the OrderPlacedEvent and dispatches it
305305
$event = new OrderPlacedEvent($order);
306-
$dispatcher->dispatch(OrderPlacedEvent::NAME, $event);
306+
$dispatcher->dispatch($event, OrderPlacedEvent::NAME);
307307

308308
Notice that the special ``OrderPlacedEvent`` object is created and passed to
309309
the ``dispatch()`` method. Now, any listener to the ``order.placed``
@@ -334,7 +334,7 @@ Take the following example of a subscriber that subscribes to the
334334

335335
use Acme\Store\Event\OrderPlacedEvent;
336336
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
337-
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
337+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
338338
use Symfony\Component\HttpKernel\KernelEvents;
339339

340340
class StoreSubscriber implements EventSubscriberInterface
@@ -350,12 +350,12 @@ Take the following example of a subscriber that subscribes to the
350350
];
351351
}
352352

353-
public function onKernelResponsePre(FilterResponseEvent $event)
353+
public function onKernelResponsePre(ResponseEvent $event)
354354
{
355355
// ...
356356
}
357357

358-
public function onKernelResponsePost(FilterResponseEvent $event)
358+
public function onKernelResponsePost(ResponseEvent $event)
359359
{
360360
// ...
361361
}
@@ -423,7 +423,7 @@ It is possible to detect if an event was stopped by using the
423423
method which returns a boolean value::
424424

425425
// ...
426-
$dispatcher->dispatch('foo.event', $event);
426+
$dispatcher->dispatch($event, 'foo.event');
427427
if ($event->isPropagationStopped()) {
428428
// ...
429429
}
@@ -441,36 +441,6 @@ name and a reference to itself to the listeners. This can lead to some advanced
441441
applications of the ``EventDispatcher`` including dispatching other events inside
442442
listeners, chaining events or even lazy loading listeners into the dispatcher object.
443443

444-
.. index::
445-
single: EventDispatcher; Dispatcher shortcuts
446-
447-
.. _event_dispatcher-shortcuts:
448-
449-
Dispatcher Shortcuts
450-
~~~~~~~~~~~~~~~~~~~~
451-
452-
If you do not need a custom event object, you can rely on a plain
453-
:class:`Symfony\\Contracts\\EventDispatcher\\Event` object. You do not even
454-
need to pass this to the dispatcher as it will create one by default unless you
455-
specifically pass one::
456-
457-
$dispatcher->dispatch('order.placed');
458-
459-
Moreover, the event dispatcher always returns whichever event object that
460-
was dispatched, i.e. either the event that was passed or the event that
461-
was created internally by the dispatcher. This allows for nice shortcuts::
462-
463-
if (!$dispatcher->dispatch('foo.event')->isPropagationStopped()) {
464-
// ...
465-
}
466-
467-
Or::
468-
469-
$event = new OrderPlacedEvent($order);
470-
$order = $dispatcher->dispatch('bar.event', $event)->getOrder();
471-
472-
and so on.
473-
474444
.. index::
475445
single: EventDispatcher; Event name introspection
476446

0 commit comments

Comments
 (0)