Skip to content

Type Mismatch in MetricRepository breaks integration test execution #55

@bosch-manuel

Description

@bosch-manuel

Hi,

we upgraded to version 3.2.4 of this package. Unfortunately, there is a type mismatch in the MetricRepository constructor which breaks our integration test suite.

    private MetricCollectionFactory $collectionFactory;
    private MetricSearchResultsInterfaceFactory $searchResultsFactory; ## <<<<

    public function __construct(
        MetricResource $metricResource,
        MetricFactory $metricFactory,
        MetricCollectionFactory $collectionFactory,
        SearchResultsInterfaceFactory $searchResultsFactory  ## <<<<
    ) {
        $this->metricFactory = $metricFactory;
        $this->metricResource = $metricResource;
        $this->collectionFactory = $collectionFactory;
        $this->searchResultsFactory = $searchResultsFactory;
    }
Module 'RunAsRoot_PrometheusExporter':

In AbstractFactory.php line 131:

  [Magento\Framework\Exception\RuntimeException]
  Type Error occurred when creating object: RunAsRoot\PrometheusExporter\Repo
  sitory\MetricRepository, Cannot assign Magento\Framework\Api\SearchResultsI
  nterfaceFactory to property RunAsRoot\PrometheusExporter\Repository\MetricR
  epository::$searchResultsFactory of type RunAsRoot\PrometheusExporter\Repos
  itory\MetricSearchResultsInterfaceFactory

This issue was already fixed by this commit: ee1fc977093e4eb4ea10db53c9d9d3f72f51d823

Can you please release a new version including this fix ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions