Skip to content

Commit a78285d

Browse files
committed
Update docs, remove NEXT_MAJOR comments
1 parent 869c947 commit a78285d

File tree

8 files changed

+4
-182
lines changed

8 files changed

+4
-182
lines changed

UPGRADE-2.0.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
UPGRADE 2.0
22
===========
33

4+
## Remove canonicalize extension
5+
6+
It is no longer needed with the new Date Picker library, the locale is automatically detected in the browser.
7+
48
## Upgrade Date Picker
59

610
Since the begining, Sonata was using Eonasdan Bootstrap Datepicker in its version 3.1.3 to provide date picker capabilities.

docs/images/color.png

-20.4 KB
Binary file not shown.

docs/reference/form_types.rst

-32
Original file line numberDiff line numberDiff line change
@@ -348,38 +348,6 @@ Example with ``Sonata\DoctrineORMAdminBundle\Filter\DateRangeFilter`` filter::
348348
}
349349
}
350350

351-
ColorType
352-
---------
353-
354-
This is HTML5 input type color.
355-
356-
.. image:: ../images/color.png
357-
358-
In order to use it, you'll need to perform a bit of setup:
359-
360-
.. code-block:: yaml
361-
362-
# config/packages/twig.yaml
363-
364-
twig:
365-
form_themes:
366-
- '@SonataForm/Form/color.html.twig'
367-
368-
Finally, in your form, you may use the form type as follows::
369-
370-
// src/Admin/PageAdmin.php
371-
372-
use Sonata\Form\Type\ColorType;
373-
374-
final class PageAdmin extends AbstractAdmin
375-
{
376-
protected function configureFormFields(FormMapper $form): void
377-
{
378-
$form
379-
->add('color', ColorType::class);
380-
}
381-
}
382-
383351
.. _`ChoiceType documentation`: https://symfony.com/doc/current/reference/forms/types/choice.html
384352
.. _`Eonasdan's Tempus Dominus`: https://github.com/Eonasdan/tempus-dominus
385353
.. _`standard date picker options`: https://getdatepicker.com/6/options/

src/Bridge/Symfony/DependencyInjection/SonataFormExtension.php

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public function load(array $configs, ContainerBuilder $container): void
4848
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
4949
$loader->load('date.php');
5050
$loader->load('form_types.php');
51-
// NEXT_MAJOR: Remove next line.
52-
$loader->load('twig.php');
5351
$loader->load('validator.php');
5452

5553
$container->setParameter('sonata.form.form_type', $config['form_type']);

src/Bridge/Symfony/Resources/config/twig.php

-35
This file was deleted.

src/Twig/CanonicalizeRuntime.php

-32
This file was deleted.

src/Twig/Extension/CanonicalizeExtension.php

-38
This file was deleted.

tests/Twig/CanonicalizeRuntimeTest.php

-43
This file was deleted.

0 commit comments

Comments
 (0)