1

I'm getting the following error on Magento 2.3:

Fatal error: '\self' is an invalid class name in /private/var/www/xxx/generated/code/Magento/Indexer/Model/Indexer/DependencyDecorator/Interceptor.php on line 137

Didn't find so much info on this after googling, except for this, but it seems to be unresolved. https://github.com/magento/magento2/issues/11905

PHP 7.2.10

Anyone ideas on what the issue is?

<?php
namespace Magento\Indexer\Model\Indexer\DependencyDecorator;
/**
 * Interceptor class for @see \Magento\Indexer\Model\Indexer\DependencyDecorator
 */
class Interceptor extends \Magento\Indexer\Model\Indexer\DependencyDecorator implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

public function __construct(\Magento\Framework\Indexer\IndexerInterface $indexer, \Magento\Framework\Indexer\Config\DependencyInfoProviderInterface $dependencyInfoProvider, \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry)
{
    $this->___init();
    parent::__construct($indexer, $dependencyInfoProvider, $indexerRegistry);
}

/**
 * {@inheritdoc}
 */
public function __call(string $method, array $args)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, '__call');
    if (!$pluginInfo) {
        return parent::__call($method, $args);
    } else {
        return $this->___callPlugins('__call', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getId() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getId');
    if (!$pluginInfo) {
        return parent::getId();
    } else {
        return $this->___callPlugins('getId', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getViewId() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getViewId');
    if (!$pluginInfo) {
        return parent::getViewId();
    } else {
        return $this->___callPlugins('getViewId', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getActionClass() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getActionClass');
    if (!$pluginInfo) {
        return parent::getActionClass();
    } else {
        return $this->___callPlugins('getActionClass', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getTitle() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTitle');
    if (!$pluginInfo) {
        return parent::getTitle();
    } else {
        return $this->___callPlugins('getTitle', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getDescription() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getDescription');
    if (!$pluginInfo) {
        return parent::getDescription();
    } else {
        return $this->___callPlugins('getDescription', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getFields() : array
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getFields');
    if (!$pluginInfo) {
        return parent::getFields();
    } else {
        return $this->___callPlugins('getFields', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getSources() : array
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getSources');
    if (!$pluginInfo) {
        return parent::getSources();
    } else {
        return $this->___callPlugins('getSources', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getHandlers() : array
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getHandlers');
    if (!$pluginInfo) {
        return parent::getHandlers();
    } else {
        return $this->___callPlugins('getHandlers', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function load($indexerId) : \self
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'load');
    if (!$pluginInfo) {
        return parent::load($indexerId);
    } else {
        return $this->___callPlugins('load', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getView() : \Magento\Framework\Mview\ViewInterface
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getView');
    if (!$pluginInfo) {
        return parent::getView();
    } else {
        return $this->___callPlugins('getView', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getState() : \Magento\Framework\Indexer\StateInterface
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getState');
    if (!$pluginInfo) {
        return parent::getState();
    } else {
        return $this->___callPlugins('getState', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function setState(\Magento\Framework\Indexer\StateInterface $state) : \self
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setState');
    if (!$pluginInfo) {
        return parent::setState($state);
    } else {
        return $this->___callPlugins('setState', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function isScheduled() : bool
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isScheduled');
    if (!$pluginInfo) {
        return parent::isScheduled();
    } else {
        return $this->___callPlugins('isScheduled', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function setScheduled($scheduled)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setScheduled');
    if (!$pluginInfo) {
        return parent::setScheduled($scheduled);
    } else {
        return $this->___callPlugins('setScheduled', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function isValid() : bool
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isValid');
    if (!$pluginInfo) {
        return parent::isValid();
    } else {
        return $this->___callPlugins('isValid', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function isInvalid() : bool
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isInvalid');
    if (!$pluginInfo) {
        return parent::isInvalid();
    } else {
        return $this->___callPlugins('isInvalid', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function isWorking() : bool
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isWorking');
    if (!$pluginInfo) {
        return parent::isWorking();
    } else {
        return $this->___callPlugins('isWorking', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function invalidate()
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'invalidate');
    if (!$pluginInfo) {
        return parent::invalidate();
    } else {
        return $this->___callPlugins('invalidate', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getStatus() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getStatus');
    if (!$pluginInfo) {
        return parent::getStatus();
    } else {
        return $this->___callPlugins('getStatus', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function getLatestUpdated() : string
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getLatestUpdated');
    if (!$pluginInfo) {
        return parent::getLatestUpdated();
    } else {
        return $this->___callPlugins('getLatestUpdated', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function reindexAll()
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'reindexAll');
    if (!$pluginInfo) {
        return parent::reindexAll();
    } else {
        return $this->___callPlugins('reindexAll', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function reindexRow($id)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'reindexRow');
    if (!$pluginInfo) {
        return parent::reindexRow($id);
    } else {
        return $this->___callPlugins('reindexRow', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function reindexList($ids)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'reindexList');
    if (!$pluginInfo) {
        return parent::reindexList($ids);
    } else {
        return $this->___callPlugins('reindexList', func_get_args(), $pluginInfo);
    }
}
}
  • please share code of your file. – Vish Feb 11 at 10:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.