Skip to content

Commit

Permalink
Migrated to exact module dependency, over from magento version specif…
Browse files Browse the repository at this point in the history
…ication. Supports 2.3.5.
  • Loading branch information
alfredsgenkins committed Sep 4, 2020
1 parent 8ae780d commit f74f133
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 30 deletions.
23 changes: 7 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
},
"authors": [
{
"name": "Yefim Butrameev",
"email": "[email protected]"
}
],
"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": [
Expand All @@ -30,4 +21,4 @@
"ScandiPWA\\CmsGraphQl\\": "src/"
}
}
}
}
1 change: 0 additions & 1 deletion src/Model/Page/Source/PageWidth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Resolver/DataProvider/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

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;

/**
* Class Block
* @package ScandiPWA\CmsGraphQl\Model\Resolver\DataProvider
*/
class Block extends \Magento\CmsGraphQl\Model\Resolver\DataProvider\Block
class Block extends CoreBlock
{
/**
* @var BlockRepositoryInterface
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Resolver/DataProvider/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -22,7 +23,7 @@
/**
* Cms page data provider
*/
class Page extends \Magento\CmsGraphQl\Model\Resolver\DataProvider\Page
class Page extends CorePage
{
/**
* @var GetPageByIdentifierInterface
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Template/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,7 +31,7 @@
* Class FilterEmulate
* @package ScandiPWA\CmsGraphQl\Model\Template
*/
class Filter extends \Magento\Widget\Model\Template\FilterEmulate
class Filter extends FilterEmulate
{

/**
Expand Down
11 changes: 6 additions & 5 deletions src/etc/db_schema.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* ScandiPWA_CmsGraphQl
* ScandiPWA - Progressive Web App for Magento
*
* @category Scandiweb
* @package ScandiPWA_CmsGraphQl
* @copyright Copyright (c) 2018 Scandiweb, Ltd (https://scandiweb.com)
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
* @link https://github.com/scandipwa/quote-graphql
*/
-->

<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="cms_page" resource="default" engine="innodb" comment="CMS Page Table">
Expand Down
12 changes: 11 additions & 1 deletion src/etc/extension_attributes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0"?>

<!--
/**
* ScandiPWA - Progressive Web App for Magento
*
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
* @link https://github.com/scandipwa/quote-graphql
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
<extension_attributes for="Magento\Cms\Api\Data\PageInterface">
<attribute code="page_width" type="string"/>
Expand Down
11 changes: 11 additions & 0 deletions src/etc/graphql/di.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* ScandiPWA - Progressive Web App for Magento
*
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
* @link https://github.com/scandipwa/quote-graphql
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Widget\Model\Template\Filter" type="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilter"/>
<preference for="Magento\Widget\Model\Template\FilterEmulate" type="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilter"/>
Expand Down
21 changes: 17 additions & 4 deletions src/etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<?xml version="1.0"?>
<!--
/**
* ScandiPWA - Progressive Web App for Magento
*
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
* @link https://github.com/scandipwa/quote-graphql
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="ScandiPWA_CmsGraphQl" setup_version="0.1.0">
<module name="ScandiPWA_CmsGraphQl">
<sequence>
<module name="Magento_CmsGraphQl"/>
<module name="Magento_GraphQl"/>
<module name="Magento_Store"/>
<module name="Magento_Variable"/>
<module name="Magento_Widget"/>
<module name="Magento_CmsGraphQl"/>
<module name="Magento_Cms"/>
</sequence>
</module>
</config>
</config>

0 comments on commit f74f133

Please sign in to comment.