From f74f1337eaf6d07ebf58c41819f7ad37859540ee Mon Sep 17 00:00:00 2001 From: Alfreds Genkins Date: Fri, 4 Sep 2020 14:33:58 +0300 Subject: [PATCH] Migrated to exact module dependency, over from magento version specification. Supports 2.3.5. --- composer.json | 23 +++++++---------------- src/Model/Page/Source/PageWidth.php | 1 - src/Model/Resolver/DataProvider/Block.php | 3 ++- src/Model/Resolver/DataProvider/Page.php | 3 ++- src/Model/Template/Filter.php | 3 ++- src/etc/db_schema.xml | 11 ++++++----- src/etc/extension_attributes.xml | 12 +++++++++++- src/etc/graphql/di.xml | 11 +++++++++++ src/etc/module.xml | 21 +++++++++++++++++---- 9 files changed, 58 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 9712e77..247cb59 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,17 @@ { "name": "scandipwa/cms-graphql", "description": "ScandiPWA Graphql extension for CMS page", - "keywords": [ - "magento2", - "scandipwa", - "pwa" - ], "type": "magento2-module", "license": [ "OSL-3.0" ], - "support": { - "email": "info@scandiweb.com" - }, - "authors": [ - { - "name": "Yefim Butrameev", - "email": "yefim.butrameev@scandiweb.com" - } - ], "require": { - "magento/module-cms-graph-ql": "*" + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-variable": "*", + "magento/module-widget": "*", + "magento/module-cms": "*", + "magento/module-cms-graph-ql": "^100.3" }, "autoload": { "files": [ @@ -30,4 +21,4 @@ "ScandiPWA\\CmsGraphQl\\": "src/" } } -} +} \ No newline at end of file diff --git a/src/Model/Page/Source/PageWidth.php b/src/Model/Page/Source/PageWidth.php index 36edbbd..e6f1593 100644 --- a/src/Model/Page/Source/PageWidth.php +++ b/src/Model/Page/Source/PageWidth.php @@ -10,7 +10,6 @@ namespace ScandiPWA\CmsGraphQl\Model\Page\Source; use Magento\Framework\Data\OptionSourceInterface; -use Magento\Framework\View\Model\PageLayout\Config\BuilderInterface; /** * Class PageWidth diff --git a/src/Model/Resolver/DataProvider/Block.php b/src/Model/Resolver/DataProvider/Block.php index aa8efc6..5299d72 100644 --- a/src/Model/Resolver/DataProvider/Block.php +++ b/src/Model/Resolver/DataProvider/Block.php @@ -11,6 +11,7 @@ use Magento\Cms\Api\BlockRepositoryInterface; use Magento\Cms\Api\Data\BlockInterface; +use Magento\CmsGraphQl\Model\Resolver\DataProvider\Block as CoreBlock; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Widget\Model\Template\FilterEmulate; @@ -18,7 +19,7 @@ * Class Block * @package ScandiPWA\CmsGraphQl\Model\Resolver\DataProvider */ -class Block extends \Magento\CmsGraphQl\Model\Resolver\DataProvider\Block +class Block extends CoreBlock { /** * @var BlockRepositoryInterface diff --git a/src/Model/Resolver/DataProvider/Page.php b/src/Model/Resolver/DataProvider/Page.php index 53464ba..b080f90 100644 --- a/src/Model/Resolver/DataProvider/Page.php +++ b/src/Model/Resolver/DataProvider/Page.php @@ -11,6 +11,7 @@ namespace ScandiPWA\CmsGraphQl\Model\Resolver\DataProvider; +use Magento\CmsGraphQl\Model\Resolver\DataProvider\Page as CorePage; use Magento\Framework\Exception\LocalizedException; use ScandiPWA\CmsGraphQl\Api\Data\PageInterface; use Magento\Cms\Api\Data\PageInterface as OriginalPageInterface; @@ -22,7 +23,7 @@ /** * Cms page data provider */ -class Page extends \Magento\CmsGraphQl\Model\Resolver\DataProvider\Page +class Page extends CorePage { /** * @var GetPageByIdentifierInterface diff --git a/src/Model/Template/Filter.php b/src/Model/Template/Filter.php index c76bf33..0b0eef6 100644 --- a/src/Model/Template/Filter.php +++ b/src/Model/Template/Filter.php @@ -22,6 +22,7 @@ use Magento\Variable\Model\Source\Variables; use Magento\Variable\Model\VariableFactory; use Magento\Widget\Block\BlockInterface; +use Magento\Widget\Model\Template\FilterEmulate; use Magento\Widget\Model\Widget; use Pelago\Emogrifier; use Psr\Log\LoggerInterface; @@ -30,7 +31,7 @@ * Class FilterEmulate * @package ScandiPWA\CmsGraphQl\Model\Template */ -class Filter extends \Magento\Widget\Model\Template\FilterEmulate +class Filter extends FilterEmulate { /** diff --git a/src/etc/db_schema.xml b/src/etc/db_schema.xml index 18e3f5e..01ff1ae 100644 --- a/src/etc/db_schema.xml +++ b/src/etc/db_schema.xml @@ -1,14 +1,15 @@ - diff --git a/src/etc/extension_attributes.xml b/src/etc/extension_attributes.xml index a00d31b..b071677 100644 --- a/src/etc/extension_attributes.xml +++ b/src/etc/extension_attributes.xml @@ -1,5 +1,15 @@ - + diff --git a/src/etc/graphql/di.xml b/src/etc/graphql/di.xml index 3797502..9d8d0d4 100644 --- a/src/etc/graphql/di.xml +++ b/src/etc/graphql/di.xml @@ -1,4 +1,15 @@ + diff --git a/src/etc/module.xml b/src/etc/module.xml index f3571d9..d2efdc3 100644 --- a/src/etc/module.xml +++ b/src/etc/module.xml @@ -1,10 +1,23 @@ + - + - - + + + + - \ No newline at end of file +