Skip to content

[v2.7] Missing classes and a method visiblity change after update #4955

@darthf1

Description

@darthf1

Hi!

Great job on the new releases! :D

When upgrading v2.6.8 to v2.7.0 I get a few errors related to missing or changed classes, and visibility changes on methods.

Below was reported originally:

Cannot autowire service "App\MyService": argument "$factory" of method "__construct()" references interface "ApiPlatform\Core\Bridge\Elasticsearch\Metadata\Document\Factory\DocumentMetadataFactoryInterface" but no such service exists. Did you create a class that implements this interface?                       

image

I also noticed another class missing:

image

New errors reported by PHPStan:

  • Call to private method getNestedFieldPath() of class ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Filter\AbstractFilter.
  • Parameter #2 $propertyNameCollectionFactory of class Infrastructure\Shared\ApiPlatform\DataProvider\Extension\CompositeAggregationExtension constructor expects ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface, ApiPlatform\Metadata\Property\Factory\CachedPropertyNameCollectionFactory given.
  • Parameter #4 $resourceClassResolver of class Infrastructure\Shared\ApiPlatform\DataProvider\Extension\CompositeAggregationExtension constructor expects ApiPlatform\Api\ResourceClassResolverInterface, ApiPlatform\Api\ResourceClassResolver given.
  • Class ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Extension\AbstractFilterExtension not found in file
    /home/www/app/src/Infrastructure/Shared/ApiPlatform/DataProvider/Extension/SearchFilterExtension.php (more details in Infection section below)

New errors reported by my PHPUnit suite:

  • Error: Class ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Extension\ConstantScoreFilterExtension not found

Another one by Infection:

Generating code coverage report in PHPUnit XML format ... The autoloader expected class `ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Extension\AbstractFilterExtension` to be defined in file "/builds/1/xxx/api/vendor/composer/../api-platform/core/src/Core/Bridge/Elasticsearch/DataProvider/Extension/AbstractFilterExtension.php". The file was found but the class was not in it, the class name or namespace probably has a typo. 

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