8000 Documented the deprecation of the Templating component by javiereguiluz · Pull Request #11231 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Documented the deprecation of the Templating component #11231

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 3 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Removed an unneeded PHP example
  • Loading branch information
javiereguiluz committed Apr 8, 2019
commit 2f349d29e16508a641ed2ce70495408dcec6339d
53 changes: 0 additions & 53 deletions form/create_custom_field_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ link for details), create a ``shipping_widget`` block to handle this:
rules). Further, the main config file should point to the custom form template
so that it's used when rendering all forms.

When using Twig this is:

.. configuration-block::

.. code-block:: yaml
Expand Down Expand Up @@ -222,57 +220,6 @@ link for details), create a ``shipping_widget`` block to handle this:
],
]);

For the PHP templating engine, your configuration should look like this:

.. configuration-block::

.. code-block:: yaml

# config/packages/framework.yaml
framework:
templating:
form:
resources:
- ':form:fields.html.php'

.. code-block:: xml

<!-- config/packages/framework.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config>
<framework:templating>
<framework:form>
<framework:resource>:form:fields.html.php</twig:resource>
</framework:form>
</framework:templating>
</framework:config>
</container>

.. code-block:: php

// config/packages/framework.php
$container->loadFromExtension('framework', [
'templating' => [
'form' => [
'resources' => [
':form:fields.html.php',
],
],
],
]);

.. deprecated:: 4.3

The integration of the Templating component in FrameworkBundle has been
deprecated since version 4.3 and will be removed in 5.0. Form theming with
PHP templates will no longer be supported and you'll need to use Twig instead.

Using the Field Type
--------------------

Expand Down
0