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

Skip to content

Commit ce64ac2

Browse files
committed
Removed deprecated contents
1 parent c168266 commit ce64ac2

23 files changed

+33
-1168
lines changed

bundles/configuration.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ The ``Configuration`` class to handle the sample configuration looks like::
197197
}
198198
}
199199

200-
.. deprecated:: 4.2
201-
202-
Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.
203-
204200
.. seealso::
205201

206202
The ``Configuration`` class can be much more complicated than shown here,

components/config/definition.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ implements the :class:`Symfony\\Component\\Config\\Definition\\ConfigurationInte
6868
}
6969
}
7070

71-
.. deprecated:: 4.2
72-
73-
Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.
74-
7571
Adding Node Definitions to the Tree
7672
-----------------------------------
7773

components/serializer.rst

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,6 @@ key in the ``context`` parameter of the desired serializer method::
434434
$serializer = new Serializer([$normalizer], [$encoder]);
435435
$serializer->serialize($person, 'json', ['ignored_attributes' => ['age']]); // Output: {"name":"foo"}
436436

437-
.. deprecated:: 4.2
438-
439-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setIgnoredAttributes`
440-
method that was used as an alternative to the ``ignored_attributes`` option
441-
was deprecated in Symfony 4.2.
442-
443437
.. _component-serializer-converting-property-names-when-serializing-and-deserializing:
444438

445439
Converting Property Names when Serializing and Deserializing
@@ -639,12 +633,6 @@ and ``remove``.
639633
Using Callbacks to Serialize Properties with Object Instances
640634
-------------------------------------------------------------
641635

642-
.. deprecated:: 4.2
643-
644-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCallbacks`
645-
method is deprecated since Symfony 4.2. Use the ``callbacks``
646-
key of the context instead.
647-
648636
When serializing, you can set a callback to format a specific object property::
649637

650638
use App\Model\Person;
@@ -664,7 +652,7 @@ When serializing, you can set a callback to format a specific object property::
664652
'createdAt' => $callback,
665653
],
666654
];
667-
655+
668656
$normalizer = new GetSetMethodNormalizer(null, null, null, null, null, $defaultContext);
669657

670658
$serializer = new Serializer([$normalizer], [$encoder]);
@@ -800,10 +788,6 @@ The ``CsvEncoder`` encodes to and decodes from CSV.
800788
You can pass the context key ``as_collection`` in order to have the results
801789
always as a collection.
802790

803-
.. deprecated:: 4.2
804-
805-
Relying on the default value ``false`` is deprecated since Symfony 4.2.
806-
807791
The ``XmlEncoder``
808792
~~~~~~~~~~~~~~~~~~
809793

@@ -951,12 +935,6 @@ The ``setCircularReferenceLimit()`` method of this normalizer sets the number
951935
of times it will serialize the same object before considering it a circular
952936
reference. Its default value is ``1``.
953937

954-
.. deprecated:: 4.2
955-
956-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCircularReferenceHandler`
957-
method is deprecated since Symfony 4.2. Use the ``circular_reference_handler``
958-
key of the context instead.
959-
960938
Instead of throwing an exception, circular references can also be handled
961939
by custom callables. This is especially useful when serializing entities
962940
having unique identifiers::

configuration/environment_variables.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ whenever the corresponding environment variable is *not* found:
9797
// config/services.php
9898
$container->setParameter('env(DATABASE_HOST)', 'localhost');
9999
100-
.. deprecated:: 4.3
100+
.. note::
101101

102-
Passing non-string values as default values for environment variables is
103-
deprecated since Symfony 4.3. Use :ref:`environment variable processors <env-var-processors>`
104-
if you need to transform those string default values into other data types.
102+
The default values of environment variables must be strings, but you can use
103+
:ref:`environment variable processors <env-var-processors>` to transform
104+
them into other data types.
105105

106106
.. _configuration-env-var-in-prod:
107107

configuration/environments.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,9 @@ Selecting the Environment for Console Commands
173173
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174174

175175
By default, Symfony commands are executed in whatever environment is defined by
176-
the ``APP_ENV`` environment variable (usually configured in your ``.env`` file).
177-
In previous Symfony versions you could use the ``--env`` (and ``--no-debug``)
178-
command line options to override this value. However, those options were
179-
deprecated in Symfony 4.2.
180-
181-
Use the ``APP_ENV`` (and ``APP_DEBUG``) environment variables to change the
182-
environment and the debug behavior of the commands:
176+
the ``APP_ENV`` environment variable and with the debug mode set by ``APP_DEBUG``.
177+
It's recommended to configure these env vars in your ``.env`` file, but you can
178+
also override them for some specific commands as follows:
183179

184180
.. code-block:: terminal
185181

console/commands_as_services.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ works! You can call the ``app:sunshine`` command and start logging.
6060
work (e.g. making database queries), as that code will be run, even if you're using
6161
the console to execute a different command.
6262

63-
.. note::
64-
65-
In previous Symfony versions, you could make the command class extend from
66-
:class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand` to
67-
get services via ``$this->getContainer()->get('SERVICE_ID')``. This is
68-
deprecated in Symfony 4.2 and it won't work in future Symfony versions.
69-
7063
.. _console-command-service-lazy-loading:
7164

7265
Lazy Loading

controller/argument_value_resolver.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,6 @@ In addition, some components and official bundles provide other value resolvers:
5353
the controller can be accessed by anonymous users. It requires installing
5454
the :doc:`Security component </components/security>`.
5555

56-
:class:`Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver`
57-
Injects the object that represents the current logged in user if type-hinted
58-
with ``UserInterface``. Default value can be set to ``null`` in case
59-
the controller can be accessed by anonymous users. It requires installing
60-
the `SecurityBundle`_.
61-
62-
.. deprecated:: 4.1
63-
64-
The ``SecurityUserValueResolver`` was deprecated in Symfony 4.1 in favor of
65-
:class:`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`.
66-
6756
``Psr7ServerRequestResolver``
6857
Injects a `PSR-7`_ compliant version of the current request if type-hinted
6958
with ``RequestInterface``, ``MessageInterface`` or ``ServerRequestInterface``.

controller/upload_file.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,13 @@ There are some important things to consider in the code of the above controller:
182182
users. This also applies to the files uploaded by your visitors. The ``UploadedFile``
183183
class provides methods to get the original file extension
184184
(:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension`),
185-
the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientSize`)
185+
the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getSize`)
186186
and the original file name (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalName`).
187187
However, they are considered *not safe* because a malicious user could tamper
188188
that information. That's why it's always better to generate a unique name and
189189
use the :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::guessExtension`
190190
method to let Symfony guess the right extension according to the file MIME type;
191191

192-
.. deprecated:: 4.1
193-
194-
The :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientSize`
195-
method was deprecated in Symfony 4.1 and will be removed in Symfony 5.0.
196-
Use ``getSize()`` instead.
197-
198192
You can use the following code to link to the PDF brochure of a product:
199193

200194
.. code-block:: html+twig

form/create_custom_field_type.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,6 @@ link for details), create a ``shipping_widget`` block to handle this:
164164
{% endspaceless %}
165165
{% endblock %}
166166

167-
.. note::
168-
169-
Symfony 4.2 deprecated calling ``FormRenderer::searchAndRenderBlock`` for
170-
fields that have already been rendered. That's why the previous example
171-
includes the ``... if not child.rendered`` statement.
172-
173167
.. tip::
174168

175169
You can further customize the template used to render each children of the

reference/configuration/framework.rst

Lines changed: 0 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,6 @@ Configuration
187187
* `storage_id`_
188188
* `use_cookies`_
189189

190-
* `templating`_
191-
192-
* :ref:`cache <reference-templating-cache>`
193-
* `engines`_
194-
* :ref:`form <reference-templating-form>`
195-
196-
* `resources`_
197-
198-
* `loaders`_
199-
200190
* `test`_
201191
* `translator`_
202192

@@ -224,7 +214,6 @@ Configuration
224214
* `endpoint`_
225215

226216
* `static_method`_
227-
* `strict_email`_
228217
* `translation_domain`_
229218

230219
* `workflows`_
@@ -1847,119 +1836,6 @@ package:
18471836
If you request an asset that is *not found* in the ``manifest.json`` file, the original -
18481837
*unmodified* - asset path will be returned.
18491838

1850-
templating
1851-
~~~~~~~~~~
1852-
1853-
.. _reference-templating-form:
1854-
1855-
form
1856-
....
1857-
1858-
resources
1859-
"""""""""
1860-
1861-
**type**: ``string[]`` **default**: ``['FrameworkBundle:Form']``
1862-
1863-
.. deprecated:: 4.3
1864-
1865-
The integration of the Templating component in FrameworkBundle has been
1866-
deprecated since version 4.3 and will be removed in 5.0. Form theming with
1867-
PHP templates will no longer be supported and you'll need to use Twig instead.
1868-
1869-
A list of all resources for form theming in PHP. This setting is not required
1870-
if you're :ref:`using the Twig format for your themes <forms-theming-twig>`.
1871-
1872-
Assume you have custom global form themes in ``templates/form_themes/``, you can
1873-
configure this like:
1874-
1875-
.. configuration-block::
1876-
1877-
.. code-block:: yaml
1878-
1879-
# config/packages/framework.yaml
1880-
framework:
1881-
templating:
1882-
form:
1883-
resources:
1884-
- 'form_themes'
1885-
1886-
.. code-block:: xml
1887-
1888-
<!-- config/packages/framework.xml -->
1889-
<?xml version="1.0" encoding="UTF-8" ?>
1890-
<container xmlns="http://symfony.com/schema/dic/services"
1891-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1892-
xmlns:framework="http://symfony.com/schema/dic/symfony"
1893-
xsi:schemaLocation="http://symfony.com/schema/dic/services
1894-
https://symfony.com/schema/dic/services/services-1.0.xsd
1895-
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1896-
1897-
<framework:config>
1898-
<framework:templating>
1899-
<framework:form>
1900-
<framework:resource>form_themes</framework:resource>
1901-
</framework:form>
1902-
</framework:templating>
1903-
</framework:config>
1904-
</container>
1905-
1906-
.. code-block:: php
1907-
1908-
// config/packages/framework.php
1909-
$container->loadFromExtension('framework', [
1910-
'templating' => [
1911-
'form' => [
1912-
'resources' => [
1913-
'form_themes',
1914-
],
1915-
],
1916-
],
1917-
]);
1918-
1919-
.. note::
1920-
1921-
The default form templates from ``FrameworkBundle:Form`` will always
1922-
be included in the form resources.
1923-
1924-
.. seealso::
1925-
1926-
See :ref:`forms-theming-global` for more information.
1927-
1928-
.. _reference-templating-cache:
1929-
1930-
cache
1931-
.....
1932-
1933-
**type**: ``string``
1934-
1935-
The path to the cache directory for templates. When this is not set, caching
1936-
is disabled.
1937-
1938-
.. note::
1939-
1940-
When using Twig templating, the caching is already handled by the
1941-
TwigBundle and doesn't need to be enabled for the FrameworkBundle.
1942-
1943-
engines
1944-
.......
1945-
1946-
**type**: ``string[]`` / ``string`` **required**
1947-
1948-
The Templating Engine to use. This can either be a string (when only one
1949-
engine is configured) or an array of engines.
1950-
1951-
At least one engine is required.
1952-
1953-
loaders
1954-
.......
1955-
1956-
**type**: ``string[]``
1957-
1958-
An array (or a string when configuring just one loader) of service ids for
1959-
templating loaders. Templating loaders are used to find and load templates
1960-
from a resource (e.g. a filesystem or database). Templating loaders must
1961-
implement :class:`Symfony\\Component\\Templating\\Loader\\LoaderInterface`.
1962-
19631839
translator
19641840
~~~~~~~~~~
19651841

@@ -2155,20 +2031,6 @@ metadata of the class. You can define an array of strings with the names of
21552031
several methods. In that case, all of them will be called in that order to load
21562032
the metadata.
21572033

2158-
strict_email
2159-
............
2160-
2161-
**type**: ``Boolean`` **default**: ``false``
2162-
2163-
.. deprecated:: 4.1
2164-
2165-
The ``strict_email`` option was deprecated in Symfony 4.1. Use the new
2166-
``email_validation_mode`` option instead.
2167-
2168-
If this option is enabled, the `egulias/email-validator`_ library will be
2169-
used by the :doc:`/reference/constraints/Email` constraint validator. Otherwise,
2170-
the validator uses a simple regular expression to validate email addresses.
2171-
21722034
email_validation_mode
21732035
.....................
21742036

reference/configuration/kernel.rst

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ Configuration
1212
-------------
1313

1414
* `Charset`_
15-
* `Kernel Name`_
1615
* `Project Directory`_
1716
* `Cache Directory`_
1817
* `Log Directory`_
1918
* `Container Build Time`_
2019

20+
In previous Symfony versions there was another configuration option to define
21+
the "kernel name", which is only important when
22+
:doc:`using applications with multiple kernels </configuration/multiple_kernels>`.
23+
If you need a unique ID for your kernels use the ``kernel.container_class``
24+
parameter or the ``Kernel::getContainerClass()`` method.
25+
2126
.. _configuration-kernel-charset:
2227

2328
Charset
@@ -44,29 +49,6 @@ charset::
4449
}
4550
}
4651

47-
Kernel Name
48-
~~~~~~~~~~~
49-
50-
**type**: ``string`` **default**: ``src`` (i.e. the directory name holding
51-
the kernel class)
52-
53-
.. deprecated:: 4.2
54-
55-
The ``kernel.name`` parameter and the ``Kernel::getName()`` method were
56-
deprecated in Symfony 4.2. If you need a unique ID for your kernels use the
57-
``kernel.container_class`` parameter or the ``Kernel::getContainerClass()`` method.
58-
59-
The name of the kernel isn't usually directly important - it's used in the
60-
generation of cache files - and you probably will only change it when
61-
:doc:`using applications with multiple kernels </configuration/multiple_kernels>`.
62-
63-
This value is exposed via the ``kernel.name`` configuration parameter and the
64-
:method:`Symfony\\Component\\HttpKernel\\Kernel::getName` method.
65-
66-
To change this setting, override the ``getName()`` method. Alternatively, move
67-
your kernel into a different directory. For example, if you moved the kernel
68-
into a ``foo/`` directory (instead of ``src/``), the kernel name will be ``foo``.
69-
7052
.. _configuration-kernel-project-directory:
7153

7254
Project Directory

0 commit comments

Comments
 (0)