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;
use Firegento\ContentProvisioning\Model\Command\ApplyBlockEntry;
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\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
......@@ -18,7 +18,7 @@ class AddBlockCommand extends Command
/**
* @var GetBlockEntryByKey
*/
private $getBlockEntryByKey;
private $getBlockEntryByKeyFactory;
/**
* @var ApplyBlockEntry
......@@ -26,17 +26,18 @@ class AddBlockCommand extends Command
private $applyBlockEntry;
/**
* @param GetBlockEntryList $getBlockEntryByKey
* @param GetBlockEntryByKeyFactory $getBlockEntryByKeyFactory
* @param ApplyBlockEntry $applyBlockEntry
* @param string|null $name
*/
public function __construct(
GetBlockEntryByKey $getBlockEntryByKey,
GetBlockEntryByKeyFactory $getBlockEntryByKeyFactory,
ApplyBlockEntry $applyBlockEntry,
string $name = null
) {
parent::__construct($name);
$this->getBlockEntryByKey = $getBlockEntryByKey;
$this->applyBlockEntry = $applyBlockEntry;
$this->getBlockEntryByKeyFactory = $getBlockEntryByKeyFactory;
$this->applyBlockEntry = $applyBlockEntry;
}
/**
......@@ -45,7 +46,7 @@ class AddBlockCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument(self::ARG_BLOCK_KEY);
$block = $this->getBlockEntryByKey->get($key);
$block = $this->getBlockEntryByKeyFactory->create()->get($key);
$this->applyBlockEntry->execute($block);
}
......
......@@ -5,8 +5,7 @@ namespace Firegento\ContentProvisioning\Model\Console;
use Firegento\ContentProvisioning\Model\Command\ApplyPageEntry;
use Firegento\ContentProvisioning\Model\Query\GetPageEntryByKey;
use Firegento\ContentProvisioning\Model\Query\GetPageEntryList\Proxy as GetPageEntryList;
use Firegento\ContentProvisioning\Model\Query\GetPagesByPageEntry\Proxy as GetPagesByPageEntry;
use Firegento\ContentProvisioning\Model\Query\GetPageEntryByKeyFactory;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
......@@ -19,7 +18,7 @@ class AddPageCommand extends Command
/**
* @var GetPageEntryByKey
*/
private $getPageEntryByKey;
private $getPageEntryByKeyFactory;
/**
* @var ApplyPageEntry
......@@ -27,18 +26,18 @@ class AddPageCommand extends Command
private $applyPageEntry;
/**
* @param GetPageEntryList $getAllContentEntries
* @param GetPagesByPageEntry $getPagesByPageEntry
* @param GetPageEntryByKeyFactory $getPageEntryByKey
* @param ApplyPageEntry $applyPageEntry
* @param string|null $name
*/
public function __construct(
GetPageEntryByKey $getPageEntryByKey,
GetPageEntryByKeyFactory $getPageEntryByKeyFactory,
ApplyPageEntry $applyPageEntry,
string $name = null
) {
parent::__construct($name);
$this->getPageEntryByKey = $getPageEntryByKey;
$this->applyPageEntry = $applyPageEntry;
$this->getPageEntryByKeyFactory = $getPageEntryByKeyFactory;
$this->applyPageEntry = $applyPageEntry;
}
/**
......@@ -47,7 +46,7 @@ class AddPageCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument(self::ARG_PAGE_KEY);
$page = $this->getPageEntryByKey->get($key);
$page = $this->getPageEntryByKeyFactory->create()->get($key);
$this->applyPageEntry->execute($page);
}
......
......@@ -2,10 +2,10 @@
"name": "firegento/magento2-content-provisioning",
"description": "N/A",
"require": {
"php": "~7.1.3|~7.2.0|~7.3.0",
"magento/framework": "100.1.*|101.0.*|102.0.*",
"magento/module-cms": "101.0.*|102.0.*|103.0.*",
"magento/module-widget": "100.1.*|101.0.*|101.1.*"
"php": "~7.1.3|~7.2.0|~7.3.0|~7.4.0",
"magento/framework": "100.1.*|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.*|101.2.*"
},
"require-dev": {
"mikey179/vfsstream": "^1.6"
......
......@@ -80,7 +80,7 @@
</arguments>
</type>
<type name="Magento\Framework\Console\CommandList">
<type name="Magento\Framework\Console\CommandListInterface">
<arguments>
<argument name="commands" xsi:type="array">
<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