Skip to content

Commit

Permalink
Replaced caution blocks with warning
Browse files Browse the repository at this point in the history
Fixes symfony#20371

Both blocks are currently rendered identically. Keeping only one of the two makes it easier to contribute.

Some blocks were elevated to danger.
  • Loading branch information
TimoBakx committed Dec 7, 2024
1 parent 119c3df commit 3849004
Show file tree
Hide file tree
Showing 143 changed files with 248 additions and 246 deletions.
1 change: 1 addition & 0 deletions .doctor-rst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ rules:
forbidden_directives:
directives:
- '.. index::'
- '.. caution::'
indention: ~
lowercase_as_in_use_statements: ~
max_blank_lines:
Expand Down
6 changes: 3 additions & 3 deletions bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Bundle System
=================

.. caution::
.. warning::

In Symfony versions prior to 4.0, it was recommended to organize your own
application code using bundles. This is :ref:`no longer recommended <best-practice-no-application-bundles>` and bundles
Expand Down Expand Up @@ -63,7 +63,7 @@ Start by creating a new class called ``AcmeBlogBundle``::
The :class:`Symfony\\Component\\HttpKernel\\Bundle\\AbstractBundle` was
introduced in Symfony 6.1.

.. caution::
.. warning::

If your bundle must be compatible with previous Symfony versions you have to
extend from the :class:`Symfony\\Component\\HttpKernel\\Bundle\\Bundle` instead.
Expand Down Expand Up @@ -123,7 +123,7 @@ to be adjusted if needed:

.. _bundles-legacy-directory-structure:

.. caution::
.. warning::

The recommended bundle structure was changed in Symfony 5, read the
`Symfony 4.4 bundle documentation`_ for information about the old
Expand Down
2 changes: 1 addition & 1 deletion bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ with Symfony Flex to install a specific Symfony version:
# recommended to have a better output and faster download time)
composer update --prefer-dist --no-progress
.. caution::
.. warning::

If you want to cache your Composer dependencies, **do not** cache the
``vendor/`` directory as this has side-effects. Instead cache
Expand Down
2 changes: 1 addition & 1 deletion bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Patterns are transformed into the actual class namespaces using the classmap
generated by Composer. Therefore, before using these patterns, you must generate
the full classmap executing the ``dump-autoload`` command of Composer.

.. caution::
.. warning::

This technique can't be used when the classes to compile use the ``__DIR__``
or ``__FILE__`` constants, because their values will change when loading
Expand Down
2 changes: 1 addition & 1 deletion bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For example, to override the ``templates/registration/confirmed.html.twig``
template from the AcmeUserBundle, create this template:
``<your-project>/templates/bundles/AcmeUserBundle/registration/confirmed.html.twig``

.. caution::
.. warning::

If you add a template in a new location, you *may* need to clear your
cache (``php bin/console cache:clear``), even if you are in debug mode.
Expand Down
2 changes: 1 addition & 1 deletion cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
//->addArgument(['env(base64:CACHE_DECRYPTION_KEY)', 'env(base64:OLD_CACHE_DECRYPTION_KEY)'])
->addArgument(new Reference('.inner'));
.. caution::
.. danger::

This will encrypt the values of the cache items, but not the cache keys. Be
careful not to leak sensitive data in the keys.
Expand Down
4 changes: 2 additions & 2 deletions components/cache/adapters/apcu_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This adapter is a high-performance, shared memory cache. It can *significantly*
increase an application's performance, as its cache contents are stored in shared
memory, a component appreciably faster than many others, such as the filesystem.

.. caution::
.. warning::

**Requirement:** The `APCu extension`_ must be installed and active to use
this adapter.
Expand All @@ -30,7 +30,7 @@ and cache items version string as constructor arguments::
$version = null
);

.. caution::
.. warning::

Use of this adapter is discouraged in write/delete heavy workloads, as these
operations cause memory fragmentation that results in significantly degraded performance.
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/couchbasebucket_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ shared memory; you can store contents independent of your PHP environment.
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
is also available.

.. caution::
.. warning::

**Requirements:** The `Couchbase PHP extension`_ as well as a `Couchbase server`_
must be installed, active, and running to use this adapter. Version ``2.6`` or
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/couchbasecollection_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ shared memory; you can store contents independent of your PHP environment.
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
is also available.

.. caution::
.. warning::

**Requirements:** The `Couchbase PHP extension`_ as well as a `Couchbase server`_
must be installed, active, and running to use this adapter. Version ``3.0`` or
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/filesystem_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ and cache root path as constructor parameters::
$directory = null
);

.. caution::
.. warning::

The overhead of filesystem IO often makes this adapter one of the *slower*
choices. If throughput is paramount, the in-memory adapters
Expand Down
4 changes: 2 additions & 2 deletions components/cache/adapters/memcached_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ shared memory; you can store contents independent of your PHP environment.
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
is also available.

.. caution::
.. warning::

**Requirements:** The `Memcached PHP extension`_ as well as a `Memcached server`_
must be installed, active, and running to use this adapter. Version ``2.2`` or
Expand Down Expand Up @@ -256,7 +256,7 @@ Available Options
executed in a "fire-and-forget" manner; no attempt to ensure the operation
has been received or acted on will be made once the client has executed it.

.. caution::
.. warning::

Not all library operations are tested in this mode. Mixed TCP and UDP
servers are not allowed.
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/php_files_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ file similar to the following::
handles file includes, this adapter has the potential to be much faster than other
filesystem-based caches.

.. caution::
.. warning::

While it supports updates and because it is using OPcache as a backend, this adapter is
better suited for append-mostly needs. Using it in other scenarios might lead to
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/redis_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and si
shared memory; you can store contents independent of your PHP environment. The ability
to utilize a cluster of servers to provide redundancy and/or fail-over is also available.

.. caution::
.. warning::

**Requirements:** At least one `Redis server`_ must be installed and running to use this
adapter. Additionally, this adapter requires a compatible extension or library that implements
Expand Down
4 changes: 2 additions & 2 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ The separator used in keys is typically ``_`` in YAML and ``-`` in XML.
For example, ``auto_connect`` in YAML and ``auto-connect`` in XML. The
normalization would make both of these ``auto_connect``.

.. caution::
.. warning::

The target key will not be altered if it's mixed like
``foo-bar_moo`` or if it already exists.
Expand Down Expand Up @@ -894,7 +894,7 @@ Otherwise the result is a clean array of configuration values::
$configs
);

.. caution::
.. warning::

When processing the configuration tree, the processor assumes that the top
level array key (which matches the extension name) is already stripped off.
2 changes: 1 addition & 1 deletion components/console/changing_default_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This will print the following to the command line:
Hello World
.. caution::
.. warning::

This feature has a limitation: you cannot pass any argument or option to
the default command because they are ignored.
Expand Down
2 changes: 1 addition & 1 deletion components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the wheel, it uses the Symfony EventDispatcher component to do the work::
$application->setDispatcher($dispatcher);
$application->run();

.. caution::
.. warning::

Console events are only triggered by the main command being executed.
Commands called by the main command will not trigger any event, unless
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/progressbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ to display it can be customized::
// the bar width
$progressBar->setBarWidth(50);

.. caution::
.. warning::

For performance reasons, Symfony redraws the screen once every 100ms. If this is too
fast or too slow for your application, use the methods
Expand Down
6 changes: 3 additions & 3 deletions components/console/helpers/questionhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ convenient for passwords::
return Command::SUCCESS;
}

.. caution::
.. warning::

When you ask for a hidden response, Symfony will use either a binary, change
``stty`` mode or use another trick to hide the response. If none is available,
Expand Down Expand Up @@ -392,7 +392,7 @@ method::
return Command::SUCCESS;
}

.. caution::
.. warning::

The normalizer is called first and the returned value is used as the input
of the validator. If the answer is invalid, don't throw exceptions in the
Expand Down Expand Up @@ -540,7 +540,7 @@ This way you can test any user interaction (even complex ones) by passing the ap
simulates a user hitting ``ENTER`` after each input, no need for passing
an additional input.

.. caution::
.. warning::

On Windows systems Symfony uses a special binary to implement hidden
questions. This means that those questions don't use the default ``Input``
Expand Down
2 changes: 1 addition & 1 deletion components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The ``$file`` variable is an instance of
:class:`Symfony\\Component\\Finder\\SplFileInfo` which extends PHP's own
:phpclass:`SplFileInfo` to provide methods to work with relative paths.

.. caution::
.. warning::

The ``Finder`` object doesn't reset its internal state automatically.
This means that you need to create a new instance if you do not want
Expand Down
2 changes: 1 addition & 1 deletion components/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ method:
// ...
.. caution::
.. warning::

The form's ``createView()`` method should be called *after* ``handleRequest()`` is
called. Otherwise, when using :doc:`form events </form/events>`, changes done
Expand Down
2 changes: 1 addition & 1 deletion components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ you will trigger the ``kernel.terminate`` event where you can perform certain
actions that you may have delayed in order to return the response as quickly
as possible to the client (e.g. sending emails).

.. caution::
.. warning::

Internally, the HttpKernel makes use of the :phpfunction:`fastcgi_finish_request`
PHP function. This means that at the moment, only the `PHP FPM`_ server
Expand Down
2 changes: 1 addition & 1 deletion components/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ distinguished name (DN) and the password of a user::

$ldap->bind($dn, $password);

.. caution::
.. danger::

When the LDAP server allows unauthenticated binds, a blank password will always be valid.

Expand Down
Loading

0 comments on commit 3849004

Please sign in to comment.