diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md new file mode 100644 index 00000000000..5856417f3e8 --- /dev/null +++ b/UPGRADE-2.0.md @@ -0,0 +1,37 @@ +# UPGRADE FROM `v1.X.X` TO `v2.0.0` + +## Codebase + +* Doctrine MongoDB and PHPCR is not longer supported in ResourceBundle and GridBundle: + + * The following classes were removed: + + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\DataSource` + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\Driver` + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilder` + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilderInterface` + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionVisitor` + * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparison` + * `Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrineODMDriver` + * `Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrinePHPCRDriver` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\DocumentRepository` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\TranslatableRepository` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\DefaultParentListener` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameFilterListener` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameResolverListener` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\Form\Builder\DefaultFormBuilder` + * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\DocumentRepository` + * `Sylius\Bundle\ResourceBundle\EventListener\ODMMappedSuperClassSubscriber` + * `Sylius\Bundle\ResourceBundle\EventListener\ODMRepositoryClassSubscriber` + * `Sylius\Bundle\ResourceBundle\EventListener\ODMTranslatableListener` + + * The following services were removed: + + * `sylius.event_subscriber.odm_mapped_super_class` + * `sylius.event_subscriber.odm_repository_class` + * `sylius.grid_driver.doctrine.phpcrodm` + + * The following parameters were removed: + + * `sylius.mongodb_odm.repository.class` + * `sylius.phpcr_odm.repository.class` diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/DataSource.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/DataSource.php index ae16c567b9c..ed695f271f6 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/DataSource.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/DataSource.php @@ -20,6 +20,8 @@ use Sylius\Component\Grid\Data\ExpressionBuilderInterface; use Sylius\Component\Grid\Parameters; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DataSource::class), E_USER_DEPRECATED); + final class DataSource implements DataSourceInterface { /** diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/Driver.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/Driver.php index c2868854805..f89e4044f26 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/Driver.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/Driver.php @@ -18,6 +18,8 @@ use Sylius\Component\Grid\Data\DriverInterface; use Sylius\Component\Grid\Parameters; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', Driver::class), E_USER_DEPRECATED); + final class Driver implements DriverInterface { /** diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilder.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilder.php index 122853521e0..6ee75b17f7c 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilder.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilder.php @@ -16,6 +16,8 @@ use Doctrine\Common\Collections\Expr\Comparison; use Doctrine\Common\Collections\ExpressionBuilder as CollectionsExpressionBuilder; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ExpressionBuilder::class), E_USER_DEPRECATED); + /** * Creates an object graph (using Doctrine\Commons\Collections\Expr\*) which we * can then walk in order to build up the PHPCR-ODM query builder. diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilderInterface.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilderInterface.php index 8f802ae840c..096320d6f94 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilderInterface.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilderInterface.php @@ -15,6 +15,8 @@ use Sylius\Component\Grid\Data\ExpressionBuilderInterface as BaseExpressionBuilderInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ExpressionBuilderInterface::class), E_USER_DEPRECATED); + interface ExpressionBuilderInterface extends BaseExpressionBuilderInterface { /** diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionVisitor.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionVisitor.php index 35e77587b93..6b311389c91 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionVisitor.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionVisitor.php @@ -19,6 +19,8 @@ use Doctrine\ODM\PHPCR\Query\Builder\AbstractNode; use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ExpressionVisitor::class), E_USER_DEPRECATED); + /** * Walks a Doctrine\Commons\Expr object graph and builds up a PHPCR-ODM * query using the (fluent) PHPCR-ODM query builder. diff --git a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExtraComparison.php b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExtraComparison.php index 87176a7540d..70b3e332cdc 100644 --- a/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExtraComparison.php +++ b/src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExtraComparison.php @@ -13,6 +13,8 @@ namespace Sylius\Bundle\GridBundle\Doctrine\PHPCRODM; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ExtraComparison::class), E_USER_DEPRECATED); + /** * Contains constants values for comparisons which are not supported * by the Doctrine\Common\Collection\Expr\Comparison class. diff --git a/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml b/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml index c254a475ed6..dbf4c63c24e 100644 --- a/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml +++ b/src/Sylius/Bundle/GridBundle/Resources/config/services/integrations/doctrine/phpcr-odm.xml @@ -18,6 +18,7 @@ + The "sylius.grid_driver.doctrine.phpcrodm" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. diff --git a/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineODMDriver.php b/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineODMDriver.php index e2db38fe89a..f5c95f1a5ab 100644 --- a/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineODMDriver.php +++ b/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineODMDriver.php @@ -22,6 +22,8 @@ use Symfony\Component\DependencyInjection\Parameter; use Symfony\Component\DependencyInjection\Reference; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DoctrineODMDriver::class), E_USER_DEPRECATED); + final class DoctrineODMDriver extends AbstractDoctrineDriver { /** diff --git a/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrinePHPCRDriver.php b/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrinePHPCRDriver.php index f9e4d57c991..4afcdb83402 100644 --- a/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrinePHPCRDriver.php +++ b/src/Sylius/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrinePHPCRDriver.php @@ -24,6 +24,8 @@ use Symfony\Component\DependencyInjection\Parameter; use Symfony\Component\DependencyInjection\Reference; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DoctrinePHPCRDriver::class), E_USER_DEPRECATED); + final class DoctrinePHPCRDriver extends AbstractDoctrineDriver { /** diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/DocumentRepository.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/DocumentRepository.php index ba2f5194622..b860ec5670c 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/DocumentRepository.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/DocumentRepository.php @@ -20,6 +20,8 @@ use Sylius\Component\Resource\Model\ResourceInterface; use Sylius\Component\Resource\Repository\RepositoryInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DocumentRepository::class), E_USER_DEPRECATED); + /** * Doctrine ODM driver resource manager. */ diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/TranslatableRepository.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/TranslatableRepository.php index 49ed487fc87..6d1325b178f 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/TranslatableRepository.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/MongoDB/TranslatableRepository.php @@ -16,6 +16,8 @@ use Doctrine\MongoDB\Query\Builder as QueryBuilder; use Sylius\Component\Resource\Repository\TranslatableRepositoryInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', TranslatableRepository::class), E_USER_DEPRECATED); + /** * Doctrine ORM driver translatable entity repository. */ diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/DocumentRepository.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/DocumentRepository.php index 8c55fbe7c19..2dfafc11a35 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/DocumentRepository.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/DocumentRepository.php @@ -20,6 +20,8 @@ use Sylius\Component\Resource\Model\ResourceInterface; use Sylius\Component\Resource\Repository\RepositoryInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DocumentRepository::class), E_USER_DEPRECATED); + /** * Doctrine PHPCR-ODM driver document repository. */ diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/DefaultParentListener.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/DefaultParentListener.php index 2a41eacb2e8..8453e0003ec 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/DefaultParentListener.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/DefaultParentListener.php @@ -18,6 +18,8 @@ use PHPCR\Util\NodeHelper; use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DefaultParentListener::class), E_USER_DEPRECATED); + /** * Automatically set the parent brefore the creation. */ diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameFilterListener.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameFilterListener.php index 21b79046864..7d513f611f8 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameFilterListener.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameFilterListener.php @@ -16,6 +16,8 @@ use Doctrine\ODM\PHPCR\DocumentManagerInterface; use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', NameFilterListener::class), E_USER_DEPRECATED); + /** * Filter the node name field, replacing invalid characters with a substitute * characters. diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameResolverListener.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameResolverListener.php index 157be60b911..dab29abd3e8 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameResolverListener.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameResolverListener.php @@ -17,6 +17,8 @@ use Doctrine\ODM\PHPCR\Mapping\ClassMetadata; use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', NameResolverListener::class), E_USER_DEPRECATED); + /** * Handles the resolution of the PHPCR node name field. * diff --git a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/Form/Builder/DefaultFormBuilder.php b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/Form/Builder/DefaultFormBuilder.php index 67dd39ca889..a646e175254 100644 --- a/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/Form/Builder/DefaultFormBuilder.php +++ b/src/Sylius/Bundle/ResourceBundle/Doctrine/ODM/PHPCR/Form/Builder/DefaultFormBuilder.php @@ -18,6 +18,8 @@ use Sylius\Component\Resource\Metadata\MetadataInterface; use Symfony\Component\Form\FormBuilderInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', DefaultFormBuilder::class), E_USER_DEPRECATED); + class DefaultFormBuilder implements DefaultFormBuilderInterface { /** diff --git a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMMappedSuperClassSubscriber.php b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMMappedSuperClassSubscriber.php index c1f1692bd0f..5b5f552bd96 100644 --- a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMMappedSuperClassSubscriber.php +++ b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMMappedSuperClassSubscriber.php @@ -18,6 +18,8 @@ use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; use Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ODMMappedSuperClassSubscriber::class), E_USER_DEPRECATED); + /** * Doctrine listener used to manipulate mappings. */ diff --git a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMRepositoryClassSubscriber.php b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMRepositoryClassSubscriber.php index d955052daee..1217b719c2d 100644 --- a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMRepositoryClassSubscriber.php +++ b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMRepositoryClassSubscriber.php @@ -17,6 +17,8 @@ use Doctrine\ODM\MongoDB\Events; use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ODMRepositoryClassSubscriber::class), E_USER_DEPRECATED); + final class ODMRepositoryClassSubscriber extends AbstractDoctrineSubscriber { /** diff --git a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMTranslatableListener.php b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMTranslatableListener.php index da245a49047..ccc070c098d 100644 --- a/src/Sylius/Bundle/ResourceBundle/EventListener/ODMTranslatableListener.php +++ b/src/Sylius/Bundle/ResourceBundle/EventListener/ODMTranslatableListener.php @@ -21,6 +21,8 @@ use Sylius\Component\Resource\Model\TranslatableInterface; use Sylius\Component\Resource\Model\TranslationInterface; +@trigger_error(sprintf('The "%s" class is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.', ODMTranslatableListener::class), E_USER_DEPRECATED); + final class ODMTranslatableListener implements EventSubscriber { /** diff --git a/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml b/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml index e3dbe1d0f5c..90caff7b37c 100644 --- a/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml +++ b/src/Sylius/Bundle/ResourceBundle/Resources/config/services/integrations/doctrine/mongodb-odm.xml @@ -22,11 +22,13 @@ + The "sylius.event_subscriber.odm_mapped_super_class" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0. + The "sylius.event_subscriber.odm_repository_class" service is deprecated since Sylius 1.3. Doctrine MongoDB and PHPCR support will no longer be supported in Sylius 2.0.