Questions tagged «compilation»

3
Magento 2 StoreManagerInterface已存在于编译中的上下文对象中
我的扩展程序中出现此错误。 PackageName \ ModuleName \ Block \ Enhanced 在类中的PackageName \ ModuleName \ Block \ Enhanced在/var/www/html/app/code/PackageName/ModuleName/Block/Enhanced.php \ Magento \ Store \ Model \ StoreManagerInterface中已经存在上下文对象 public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Model\Session $catalogSession, \Magento\Store\Model\StoreManagerInterface $storeManager, array $data = [] ) { parent::__construct($context, $data); $this->_catalogSession = $catalogSession; $this->_storeManager = $storeManager; }

1
Magento2 DI编译花费太多时间
创建/更新新模块/主题后,我在Magento根安装目录中使用以下命令 php bin/magento setup:upgrade 这要求我运行编译,所以我使用 php bin/magento setup:di:compile 编译大约需要8分钟的时间。有没有办法加快编译过程?

1
magento2的编译中上下文对象中已经存在不正确的依赖项ScopeConfigInterface
<?php /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Ortho\Featuredproduct\Helper; use Magento\Framework\App\Helper\AbstractHelper; /** * Search helper */ class Data extends AbstractHelper { /** * @var \Magento\Framework\App\Config\ScopeConfigInterfac */ protected $_scopeConfig; protected $_config; protected $_storeManager; protected $_productFactory; CONST FEATURED_ENABLE = 'featured_settings/general/isenable'; CONST FEATURED_TITLE …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.