Skip to content

Commit 234cf3e

Browse files
committed
minor #11621 Removed deprecated contents (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #11621). Discussion ---------- Removed deprecated contents This is related to #11620 and removes deprecated things. The only remaining deprecation is the `transChoice()` method. I'm leaving that for future PRs because @wouterj created a big PR pending to be merged related to that. Commits ------- ce64ac2 Removed deprecated contents
2 parents 1bce5d2 + ce64ac2 commit 234cf3e

23 files changed

+32
-1173
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: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,6 @@ key in the ``context`` parameter of the desired serializer method::
429429
$serializer = new Serializer([$normalizer], [$encoder]);
430430
$serializer->serialize($person, 'json', ['ignored_attributes' => ['age']]); // Output: {"name":"foo"}
431431

432-
.. deprecated:: 4.2
433-
434-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setIgnoredAttributes`
435-
method that was used as an alternative to the ``ignored_attributes`` option
436-
was deprecated in Symfony 4.2.
437-
438432
.. _component-serializer-converting-property-names-when-serializing-and-deserializing:
439433

440434
Converting Property Names when Serializing and Deserializing
@@ -634,12 +628,6 @@ and ``remove``.
634628
Using Callbacks to Serialize Properties with Object Instances
635629
-------------------------------------------------------------
636630

637-
.. deprecated:: 4.2
638-
639-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCallbacks`
640-
method is deprecated since Symfony 4.2. Use the ``callbacks``
641-
key of the context instead.
642-
643631
When serializing, you can set a callback to format a specific object property::
644632

645633
use App\Model\Person;
@@ -795,10 +783,6 @@ The ``CsvEncoder`` encodes to and decodes from CSV.
795783
You can pass the context key ``as_collection`` in order to have the results
796784
always as a collection.
797785

798-
.. deprecated:: 4.2
799-
800-
Relying on the default value ``false`` is deprecated since Symfony 4.2.
801-
802786
The ``XmlEncoder``
803787
~~~~~~~~~~~~~~~~~~
804788

@@ -946,12 +930,6 @@ The ``setCircularReferenceLimit()`` method of this normalizer sets the number
946930
of times it will serialize the same object before considering it a circular
947931
reference. Its default value is ``1``.
948932

949-
.. deprecated:: 4.2
950-
951-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCircularReferenceHandler`
952-
method is deprecated since Symfony 4.2. Use the ``circular_reference_handler``
953-
key of the context instead.
954-
955933
Instead of throwing an exception, circular references can also be handled
956934
by custom callables. This is especially useful when serializing entities
957935
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 & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ Configuration
208208
* `storage_id`_
209209
* `use_cookies`_
210210

211-
* `templating`_
212-
213-
* :ref:`cache <reference-templating-cache>`
214-
* `engines`_
215-
* :ref:`form <reference-templating-form>`
216-
217-
* `resources`_
218-
219-
* `loaders`_
220-
221211
* `test`_
222212
* `translator`_
223213

@@ -245,7 +235,6 @@ Configuration
245235
* `endpoint`_
246236

247237
* `static_method`_
248-
* `strict_email`_
249238
* `translation_domain`_
250239

251240
* `workflows`_
@@ -1865,125 +1854,6 @@ package:
18651854
If you request an asset that is *not found* in the ``manifest.json`` file, the original -
18661855
*unmodified* - asset path will be returned.
18671856

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

@@ -2167,20 +2037,6 @@ metadata of the class. You can define an array of strings with the names of
21672037
several methods. In that case, all of them will be called in that order to load
21682038
the metadata.
21692039

2170-
strict_email
2171-
............
2172-
2173-
**type**: ``Boolean`` **default**: ``false``
2174-
2175-
.. deprecated:: 4.1
2176-
2177-
The ``strict_email`` option was deprecated in Symfony 4.1. Use the new
2178-
``email_validation_mode`` option instead.
2179-
2180-
If this option is enabled, the `egulias/email-validator`_ library will be
2181-
used by the :doc:`/reference/constraints/Email` constraint validator. Otherwise,
2182-
the validator uses a simple regular expression to validate email addresses.
2183-
21842040
email_validation_mode
21852041
.....................
21862042

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)