Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Mar 25, 2023
1 parent dcac56b commit 247c176
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.7.1] - 25 March 2023
### Fixed
- Swap dep of ExtensionChecker with core module info

## [1.7.0] - 24 March 2023
### Added
- Added dependency with new `Yireo_AdminReactComponents` module
Expand Down
25 changes: 17 additions & 8 deletions Controller/Adminhtml/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
use Magento\Framework\Component\ComponentRegistrar;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Message\ManagerInterface;
use Magento\Framework\Module\ModuleList;
use Magento\Framework\View\Result\PageFactory;
use Yireo\EmailTester2\Config\Config;
use Yireo\EmailTester2\ViewModel\Form;
use Yireo\ExtensionChecker\Util\ModuleInfo;

class Index extends Action
{
Expand All @@ -41,12 +41,21 @@ class Index extends Action
* @var Config
*/
private $config;

/**
* @var Form
*/
private $formViewModel;
private ComponentRegistrar $componentRegistrar;
private ModuleInfo $moduleInfo;

/**
* @var ComponentRegistrar
*/
private $componentRegistrar;

/**
* @var ModuleList
*/
private $moduleList;

/**
* @param Context $context
Expand All @@ -55,7 +64,7 @@ class Index extends Action
* @param Config $config
* @param Form $formViewModel
* @param ComponentRegistrar $componentRegistrar
* @param ModuleInfo $moduleInfo
* @param ModuleList $moduleList
*/
public function __construct(
Context $context,
Expand All @@ -64,15 +73,15 @@ public function __construct(
Config $config,
Form $formViewModel,
ComponentRegistrar $componentRegistrar,
ModuleInfo $moduleInfo
ModuleList $moduleList
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
$this->messageManager = $messageManager;
$this->config = $config;
$this->formViewModel = $formViewModel;
$this->componentRegistrar = $componentRegistrar;
$this->moduleInfo = $moduleInfo;
$this->moduleList = $moduleList;
}

/**
Expand Down Expand Up @@ -129,8 +138,8 @@ private function checkForAdminReactComponents()
$this->messageManager->addErrorMessage('Module "Yireo_AdminReactComponents" is required but is not installed');
}

$moduleInfo = $this->moduleInfo->getModuleInfo('Yireo_AdminReactComponents');
if (empty($moduleInfo)) {
$moduleList = $this->moduleList->getOne('Yireo_AdminReactComponents');
if (empty($moduleList)) {
$this->messageManager->addErrorMessage('Module "Yireo_AdminReactComponents" is required but is not enabled');
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yireo/magento2-emailtester2",
"version": "1.7.0",
"version": "1.7.1",
"license": "OSL-3.0",
"type": "magento2-module",
"homepage": "https://www.yireo.com/software/magento-extensions/emailtester2",
Expand Down

0 comments on commit 247c176

Please sign in to comment.