|
11 | 11 | use Magento\AsyncConfig\Setup\ConfigOptionsList;
|
12 | 12 | use Magento\Config\Controller\Adminhtml\System\Config\Save;
|
13 | 13 | use Magento\Framework\App\DeploymentConfig;
|
14 |
| -use Magento\Framework\App\ObjectManager; |
15 | 14 | use Magento\Framework\Controller\Result\RedirectFactory;
|
16 | 15 | use Magento\Framework\Exception\FileSystemException;
|
17 | 16 | use Magento\Framework\Exception\LocalizedException;
|
@@ -42,21 +41,19 @@ class SaveAsyncConfigPlugin
|
42 | 41 |
|
43 | 42 | /**
|
44 | 43 | *
|
45 |
| - * @param DeploymentConfig|null $deploymentConfig |
46 |
| - * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher |
| 44 | + * @param DeploymentConfig $deploymentConfig |
| 45 | + * @param AsyncConfigPublisherInterface $asyncConfigPublisher |
47 | 46 | * @param RedirectFactory $resultRedirectFactory
|
48 | 47 | * @param ManagerInterface $messageManager
|
49 | 48 | */
|
50 | 49 | public function __construct(
|
51 |
| - DeploymentConfig $deploymentConfig = null, |
52 |
| - AsyncConfigPublisherInterface $asyncConfigPublisher = null, |
| 50 | + DeploymentConfig $deploymentConfig, |
| 51 | + AsyncConfigPublisherInterface $asyncConfigPublisher, |
53 | 52 | RedirectFactory $resultRedirectFactory,
|
54 | 53 | ManagerInterface $messageManager
|
55 | 54 | ) {
|
56 |
| - $this->deploymentConfig = $deploymentConfig |
57 |
| - ?? ObjectManager::getInstance()->get(DeploymentConfig::class); |
58 |
| - $this->asyncConfigPublisher = $asyncConfigPublisher |
59 |
| - ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); |
| 55 | + $this->deploymentConfig = $deploymentConfig; |
| 56 | + $this->asyncConfigPublisher = $asyncConfigPublisher; |
60 | 57 | $this->resultRedirectFactory = $resultRedirectFactory;
|
61 | 58 | $this->messageManager = $messageManager;
|
62 | 59 | }
|
|
0 commit comments