Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Add deprecations #742

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"twig/twig": "^1.34 || ^2.0"
},
"conflict": {
"sonata-project/exporter": "< 1.11.0"
"sonata-project/exporter": "< 1.11"
},
"require-dev": {
"doctrine/orm": "^2.4",
Expand All @@ -48,7 +48,8 @@
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"nelmio/api-doc-bundle": "^2.11",
"sonata-project/exporter": "^1.11.0 || ^2.0",
"phpspec/prophecy": "^1.0",
"sonata-project/exporter": "^1.11 || ^2.0",
"symfony/phpunit-bridge": "^4.3"
},
"suggest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* @author Thomas Rabaix <[email protected]>
*
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class AdapterCompilerPass implements CompilerPassInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* @author Hugo Briand <[email protected]>
*
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class StatusRendererCompilerPass implements CompilerPassInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/CoreBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*
* @author Thomas Rabaix <[email protected]>
* @author Alexander <[email protected]>
*
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class Configuration implements ConfigurationInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/CoreBundle/DependencyInjection/SonataCoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

/**
* @author Thomas Rabaix <[email protected]>
*
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class SonataCoreExtension extends Extension implements PrependExtensionInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/CoreBundle/Exporter/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

/**
* NEXT_MAJOR: remove this class, and the dev dependency.
*
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class Exporter
{
Expand Down
3 changes: 3 additions & 0 deletions src/CoreBundle/Form/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\Form\FormTypeInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
class FormHelper
{
private static $typeMapping = [];
Expand Down
3 changes: 3 additions & 0 deletions src/CoreBundle/Model/PageableManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class_alias(
);

if (false) {
/**
* @deprecated since sonata-project/core-bundle 3.x, to be removed in 4.0.
*/
interface PageableManagerInterface extends \Sonata\Doctrine\Model\PageableManagerInterface
{
}
Expand Down
2 changes: 2 additions & 0 deletions src/CoreBundle/Resources/config/commands.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="Sonata\CoreBundle\Command\SonataDumpDoctrineMetaCommand" class="Sonata\CoreBundle\Command\SonataDumpDoctrineMetaCommand">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0.</deprecated>
<tag name="console.command"/>
</service>
<service id="Sonata\CoreBundle\Command\SonataListFormMappingCommand" class="Sonata\CoreBundle\Command\SonataListFormMappingCommand">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0.</deprecated>
<tag name="console.command"/>
</service>
</services>
Expand Down
5 changes: 4 additions & 1 deletion src/CoreBundle/Resources/config/core.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.core.slugify.cocur" class="Cocur\Slugify\Slugify" public="true"/>
<service id="sonata.core.slugify.cocur" class="Cocur\Slugify\Slugify" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.slugify.cocur" instead.</deprecated>
</service>
<service id="sonata.core.slugify.native" class="Sonata\CoreBundle\Component\NativeSlugify" public="true">
<deprecated>The "%service_id%" service is deprecated since 2.3 and will be removed in 4.0.</deprecated>
</service>
<service id="sonata.core.form.extension.dependency" class="Sonata\CoreBundle\Form\Extension\DependencyInjectionExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0.</deprecated>
<argument type="service" id="service_container"/>
<argument type="collection"/>
<argument type="collection"/>
Expand Down
4 changes: 3 additions & 1 deletion src/CoreBundle/Resources/config/date.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.core.date.moment_format_converter" class="Sonata\Form\Date\MomentFormatConverter"/>
<service id="sonata.core.date.moment_format_converter" class="Sonata\Form\Date\MomentFormatConverter">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.date.moment_format_converter" instead.</deprecated>
</service>
</services>
</container>
4 changes: 3 additions & 1 deletion src/CoreBundle/Resources/config/exporter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!-- NEXT_MAJOR : remove this file -->
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.core.exporter" class="Sonata\CoreBundle\Exporter\Exporter"/>
<service id="sonata.core.exporter" class="Sonata\CoreBundle\Exporter\Exporter">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.exporter.exporter" instead.</deprecated>
</service>
</services>
</container>
3 changes: 3 additions & 0 deletions src/CoreBundle/Resources/config/flash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
</parameters>
<services>
<service id="sonata.core.flashmessage.manager" class="%sonata.core.flashmessage.manager.class%" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.flashmessage.manager" instead.</deprecated>
<tag name="sonata.status.renderer"/>
<argument type="service" id="session"/>
<argument type="service" id="translator"/>
<argument/>
<argument/>
</service>
<service id="sonata.core.flashmessage.twig.runtime" class="Sonata\Twig\Extension\FlashMessageRuntime">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.flashmessage.twig.runtime" instead.</deprecated>
<tag name="twig.runtime"/>
<argument type="service" id="sonata.core.flashmessage.manager"/>
</service>
<service id="sonata.core.flashmessage.twig.extension" class="%sonata.core.twig.extension.flashmessage.class%" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.flashmessage.twig.extension" instead.</deprecated>
<tag name="twig.extension"/>
</service>
</services>
Expand Down
21 changes: 21 additions & 0 deletions src/CoreBundle/Resources/config/form_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.core.form.type.array_legacy" class="Sonata\CoreBundle\Form\Type\ImmutableArrayType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.array" instead.</deprecated>
<tag name="form.type" alias="sonata_type_immutable_array_legacy"/>
</service>
<service id="sonata.core.form.type.boolean_legacy" class="Sonata\CoreBundle\Form\Type\BooleanType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.boolean" instead.</deprecated>
<tag name="form.type" alias="sonata_type_boolean_legacy"/>
</service>
<service id="sonata.core.form.type.collection_legacy" class="Sonata\CoreBundle\Form\Type\CollectionType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.collection" instead.</deprecated>
<tag name="form.type" alias="sonata_type_collection_legacy"/>
</service>
<service id="sonata.core.form.type.translatable_choice" class="Sonata\CoreBundle\Form\Type\TranslatableChoiceType" public="true">
Expand All @@ -16,32 +19,39 @@
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.date_range_legacy" class="Sonata\CoreBundle\Form\Type\DateRangeType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.date_range" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_range_legacy"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_range_legacy" class="Sonata\CoreBundle\Form\Type\DateTimeRangeType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_range" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_range_legacy"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.date_picker_legacy" class="Sonata\CoreBundle\Form\Type\DatePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.date_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_picker_legacy"/>
<argument type="service" id="sonata.core.date.moment_format_converter"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_picker_legacy" class="Sonata\CoreBundle\Form\Type\DateTimePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_picker_legacy"/>
<argument type="service" id="sonata.core.date.moment_format_converter"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.date_range_picker_legacy" class="Sonata\CoreBundle\Form\Type\DateRangePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.date_range_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_range_picker_legacy"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_range_picker_legacy" class="Sonata\CoreBundle\Form\Type\DateTimeRangePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_range_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_range_picker_legacy"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.equal_legacy" class="Sonata\CoreBundle\Form\Type\EqualType" public="true">
<deprecated>The "%service_id%" service is deprecated since 3.x and will be removed in 4.0. Use "sonata.form.type.equal" instead.</deprecated>
<tag name="form.type" alias="sonata_type_equal_legacy"/>
<argument type="service" id="translator"/>
</service>
Expand All @@ -50,44 +60,55 @@
<tag name="form.type" alias="sonata_type_color_selector"/>
</service>
<service id="sonata.core.form.type.color_legacy" class="Sonata\CoreBundle\Form\Type\ColorType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0.</deprecated>
<tag name="form.type" alias="sonata_type_color"/>
</service>
<service id="sonata.core.form.type.array" class="Sonata\Form\Type\ImmutableArrayType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.array" instead.</deprecated>
<tag name="form.type" alias="sonata_type_immutable_array"/>
</service>
<service id="sonata.core.form.type.boolean" class="Sonata\Form\Type\BooleanType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.boolean" instead.</deprecated>
<tag name="form.type" alias="sonata_type_boolean"/>
</service>
<service id="sonata.core.form.type.collection" class="Sonata\Form\Type\CollectionType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.collection" instead.</deprecated>
<tag name="form.type" alias="sonata_type_collection"/>
</service>
<service id="sonata.core.form.type.date_range" class="Sonata\Form\Type\DateRangeType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.date_range" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_range"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_range" class="Sonata\Form\Type\DateTimeRangeType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_range" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_range"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.date_picker" class="Sonata\Form\Type\DatePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.date_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_picker"/>
<argument type="service" id="sonata.core.date.moment_format_converter"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_picker" class="Sonata\Form\Type\DateTimePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_picker"/>
<argument type="service" id="sonata.core.date.moment_format_converter"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.date_range_picker" class="Sonata\Form\Type\DateRangePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.date_range_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_date_range_picker"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.datetime_range_picker" class="Sonata\Form\Type\DateTimeRangePickerType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.datetime_range_picker" instead.</deprecated>
<tag name="form.type" alias="sonata_type_datetime_range_picker"/>
<argument type="service" id="translator"/>
</service>
<service id="sonata.core.form.type.equal" class="Sonata\Form\Type\EqualType" public="true">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.form.type.equal" instead.</deprecated>
<tag name="form.type" alias="sonata_type_equal"/>
<argument type="service" id="translator"/>
</service>
Expand Down
6 changes: 6 additions & 0 deletions src/CoreBundle/Resources/config/twig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,29 @@
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.core.twig.extension.wrapping" class="Sonata\Twig\Extension\FormTypeExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.extension.wrapping" instead.</deprecated>
<tag name="twig.extension"/>
<argument>%sonata.core.form_type%</argument>
</service>
<!-- NEXT_MAJOR : remove this service -->
<service id="sonata.core.twig.extension.text" class="Sonata\CoreBundle\Twig\Extension\DeprecatedTextExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0.</deprecated>
<tag name="twig.extension"/>
</service>
<service id="sonata.core.twig.status_runtime" class="Sonata\Twig\Extension\StatusRuntime">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.status_runtime" instead.</deprecated>
<tag name="twig.runtime"/>
</service>
<service id="sonata.core.twig.status_extension" class="Sonata\CoreBundle\Twig\Extension\StatusExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.status_extension" instead.</deprecated>
<tag name="twig.extension"/>
</service>
<service id="sonata.core.twig.deprecated_template_extension" class="Sonata\Twig\Extension\DeprecatedTemplateExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.deprecated_template_extension" instead.</deprecated>
<tag name="twig.extension"/>
</service>
<service id="sonata.core.twig.template_extension" class="Sonata\Twig\Extension\TemplateExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/core-bundle 3.x and will be removed in 4.0. Use "sonata.twig.template_extension" instead.</deprecated>
<tag name="twig.extension"/>
<argument>%kernel.debug%</argument>
<argument type="service" id="translator"/>
Expand Down
Loading