Skip to content
Snippets Groups Projects
Unverified Commit 11734edf authored by Vadim Justus's avatar Vadim Justus Committed by GitHub
Browse files

Merge pull request #33 from ffalkone/develop

Add support for Magento 2.4
parents 0b9f45e8 2d4b2d9b
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ namespace Firegento\ContentProvisioning\Model\Console; ...@@ -5,7 +5,7 @@ namespace Firegento\ContentProvisioning\Model\Console;
use Firegento\ContentProvisioning\Model\Command\ApplyBlockEntry; use Firegento\ContentProvisioning\Model\Command\ApplyBlockEntry;
use Firegento\ContentProvisioning\Model\Query\GetBlockEntryByKey; use Firegento\ContentProvisioning\Model\Query\GetBlockEntryByKey;
use Firegento\ContentProvisioning\Model\Query\GetBlockEntryList\Proxy as GetBlockEntryList; use Firegento\ContentProvisioning\Model\Query\GetBlockEntryByKeyFactory;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
...@@ -18,7 +18,7 @@ class AddBlockCommand extends Command ...@@ -18,7 +18,7 @@ class AddBlockCommand extends Command
/** /**
* @var GetBlockEntryByKey * @var GetBlockEntryByKey
*/ */
private $getBlockEntryByKey; private $getBlockEntryByKeyFactory;
/** /**
* @var ApplyBlockEntry * @var ApplyBlockEntry
...@@ -26,17 +26,18 @@ class AddBlockCommand extends Command ...@@ -26,17 +26,18 @@ class AddBlockCommand extends Command
private $applyBlockEntry; private $applyBlockEntry;
/** /**
* @param GetBlockEntryList $getBlockEntryByKey * @param GetBlockEntryByKeyFactory $getBlockEntryByKeyFactory
* @param ApplyBlockEntry $applyBlockEntry
* @param string|null $name * @param string|null $name
*/ */
public function __construct( public function __construct(
GetBlockEntryByKey $getBlockEntryByKey, GetBlockEntryByKeyFactory $getBlockEntryByKeyFactory,
ApplyBlockEntry $applyBlockEntry, ApplyBlockEntry $applyBlockEntry,
string $name = null string $name = null
) { ) {
parent::__construct($name); parent::__construct($name);
$this->getBlockEntryByKey = $getBlockEntryByKey; $this->getBlockEntryByKeyFactory = $getBlockEntryByKeyFactory;
$this->applyBlockEntry = $applyBlockEntry; $this->applyBlockEntry = $applyBlockEntry;
} }
/** /**
...@@ -45,7 +46,7 @@ class AddBlockCommand extends Command ...@@ -45,7 +46,7 @@ class AddBlockCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
$key = $input->getArgument(self::ARG_BLOCK_KEY); $key = $input->getArgument(self::ARG_BLOCK_KEY);
$block = $this->getBlockEntryByKey->get($key); $block = $this->getBlockEntryByKeyFactory->create()->get($key);
$this->applyBlockEntry->execute($block); $this->applyBlockEntry->execute($block);
} }
......
...@@ -5,8 +5,7 @@ namespace Firegento\ContentProvisioning\Model\Console; ...@@ -5,8 +5,7 @@ namespace Firegento\ContentProvisioning\Model\Console;
use Firegento\ContentProvisioning\Model\Command\ApplyPageEntry; use Firegento\ContentProvisioning\Model\Command\ApplyPageEntry;
use Firegento\ContentProvisioning\Model\Query\GetPageEntryByKey; use Firegento\ContentProvisioning\Model\Query\GetPageEntryByKey;
use Firegento\ContentProvisioning\Model\Query\GetPageEntryList\Proxy as GetPageEntryList; use Firegento\ContentProvisioning\Model\Query\GetPageEntryByKeyFactory;
use Firegento\ContentProvisioning\Model\Query\GetPagesByPageEntry\Proxy as GetPagesByPageEntry;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
...@@ -19,7 +18,7 @@ class AddPageCommand extends Command ...@@ -19,7 +18,7 @@ class AddPageCommand extends Command
/** /**
* @var GetPageEntryByKey * @var GetPageEntryByKey
*/ */
private $getPageEntryByKey; private $getPageEntryByKeyFactory;
/** /**
* @var ApplyPageEntry * @var ApplyPageEntry
...@@ -27,18 +26,18 @@ class AddPageCommand extends Command ...@@ -27,18 +26,18 @@ class AddPageCommand extends Command
private $applyPageEntry; private $applyPageEntry;
/** /**
* @param GetPageEntryList $getAllContentEntries * @param GetPageEntryByKeyFactory $getPageEntryByKey
* @param GetPagesByPageEntry $getPagesByPageEntry * @param ApplyPageEntry $applyPageEntry
* @param string|null $name * @param string|null $name
*/ */
public function __construct( public function __construct(
GetPageEntryByKey $getPageEntryByKey, GetPageEntryByKeyFactory $getPageEntryByKeyFactory,
ApplyPageEntry $applyPageEntry, ApplyPageEntry $applyPageEntry,
string $name = null string $name = null
) { ) {
parent::__construct($name); parent::__construct($name);
$this->getPageEntryByKey = $getPageEntryByKey; $this->getPageEntryByKeyFactory = $getPageEntryByKeyFactory;
$this->applyPageEntry = $applyPageEntry; $this->applyPageEntry = $applyPageEntry;
} }
/** /**
...@@ -47,7 +46,7 @@ class AddPageCommand extends Command ...@@ -47,7 +46,7 @@ class AddPageCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
$key = $input->getArgument(self::ARG_PAGE_KEY); $key = $input->getArgument(self::ARG_PAGE_KEY);
$page = $this->getPageEntryByKey->get($key); $page = $this->getPageEntryByKeyFactory->create()->get($key);
$this->applyPageEntry->execute($page); $this->applyPageEntry->execute($page);
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
"name": "firegento/magento2-content-provisioning", "name": "firegento/magento2-content-provisioning",
"description": "N/A", "description": "N/A",
"require": { "require": {
"php": "~7.1.3|~7.2.0|~7.3.0", "php": "~7.1.3|~7.2.0|~7.3.0|~7.4.0",
"magento/framework": "100.1.*|101.0.*|102.0.*", "magento/framework": "100.1.*|101.0.*|102.0.*|103.0.*",
"magento/module-cms": "101.0.*|102.0.*|103.0.*", "magento/module-cms": "101.0.*|102.0.*|103.0.*|104.0.*",
"magento/module-widget": "100.1.*|101.0.*|101.1.*" "magento/module-widget": "100.1.*|101.0.*|101.1.*|101.2.*"
}, },
"require-dev": { "require-dev": {
"mikey179/vfsstream": "^1.6" "mikey179/vfsstream": "^1.6"
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</arguments> </arguments>
</type> </type>
<type name="Magento\Framework\Console\CommandList"> <type name="Magento\Framework\Console\CommandListInterface">
<arguments> <arguments>
<argument name="commands" xsi:type="array"> <argument name="commands" xsi:type="array">
<item name="contentProvisioning.PageList" xsi:type="object">Firegento\ContentProvisioning\Model\Console\PageListCommand</item> <item name="contentProvisioning.PageList" xsi:type="object">Firegento\ContentProvisioning\Model\Console\PageListCommand</item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment